Download as docx, pdf, or txt
Download as docx, pdf, or txt
You are on page 1of 1

&Filename = 'DiarioSimplificadoExcelExport.xls' &Random = Random() * 10000 //&Filename = !"ExportWWPRUEBA-" + &Random.ToString().Trim() + !".xls" //&Filename = 'Diario_Simplificado_' + &Random.ToString().Trim() + '.xls' //&ExcelDocument.UseAutomation = 0 &ExcelDocument.

Open(&Filename) Do 'CheckStatus' &ExcelDocument.Clear() &CellRow = 1 &FirstColumn = 1 // Write titles &ExcelDocument.Cells(&CellRow, &ExcelDocument.Cells(&CellRow, &ExcelDocument.Cells(&CellRow, &ExcelDocument.Cells(&CellRow, &ExcelDocument.Cells(&CellRow, &ExcelDocument.Cells(&CellRow, &FirstColumn &FirstColumn &FirstColumn &FirstColumn &FirstColumn &FirstColumn + + + + + + 0).Bold 0).Text 1).Bold 1).Text 2).Bold 2).Text = = = = = = 1 'Columna 01' 1 'Columna 2' 1 'Columna 3'// For each

// Write cell values for each &CellRow += 1 &ExcelDocument.Cells(&CellRow, &FirstColumn + 0).Text = DocumentoId &ExcelDocument.Cells(&CellRow, &FirstColumn + 1).Text = DocumentoDes //&ExcelDocument.Cells(&CellRow, &FirstColumn + 2).Date = CustomerBirthDate Endfor &ExcelDocument.Save() Do 'CheckStatus' &ExcelDocument.Close() Sub 'CheckStatus' If (&ExcelDocument.ErrCode <> 0) &Filename = "" // &ErrorMessage = &ExcelDocument.ErrDescription &ExcelDocument.Close() Return Endif Endsub

You might also like