Hi,
I am trying to render attached excel sheet on Gridweb but it changes the style, alignment and formatting of data. These are the defects reported by testers.
1. DOB/Date- In Original sheet it is Right Alignment and in the Template it is Left Alignment.
2. Accounting Field: Original Sheet Value: $ 100.00, In the Automation Template: $*100.00
3. Time Format: Origial Sheet: 4:12:00 PM
Template excel sheet: 16:12:00A12/P1
4. Fractionals: Original Sheet: 212
Template Sheet: 212/
This is how i am rendering the excel sheet. Variable path is a path to the attached excel file. I am attaching original excel sheet and screen output. Ideally it should preserve the style, alignment and formatting ...for each cell while rendering it on gridweb. Please help me to solve this problem?
Workbook workbook = new Workbook(path);
//Delete blank rows from each worksheet
foreach (var sheet in workbook.Worksheets) {
sheet.Cells.DeleteBlankRows();
}
//Save the workbook into memory stream
MemoryStream ms = new MemoryStream();
workbook.Save(ms,SaveFormat.Auto);
ms.Position = 0;
//Import excel file from memory stream
GridWeb1.ForceValidation = false;
GridWeb1.WebWorksheets.Clear();
GridWeb1.WebWorksheets.ImportExcelFile(ms);
GridWeb1.ShowSaveButton = false;
GridWeb1.ShowContextMenu = false;
GridWeb1.ShowSubmitButton = false;
GridWeb1.ShowUndoButton = false;
foreach (var ws in workbook.Worksheets) {
if (!ws.IsVisible)
GridWeb1.WebWorksheets.RemoveAt(ws.Name);
}