IF NOT CREATE(XlApp) THEN
ERROR('Excel Not Found.');
xlBook := xlApp.Workbooks.Add(-4167);
xlSheet:= xlApp.ActiveSheet;
xlSheet.Name := 'Mohana'; //Sheet name
xlSheet.Range('A1').Value := 'Mohana';
xlSheet.Range('B1').Value := 'MVP-Microsoft Dynamics NAV';
xlSheet.Columns.AutoFit;
xlApp.Visible := TRUE;
xlBook.SaveAs('C:\Test\Mohana.xlsx'); // To save the excel file
xlBook.Close; //To Close the Excel
thanks sir...
ReplyDeleteHi Sir, similarly can i save to CSV file format?
ReplyDeletePlease help me for knowing these variable
ReplyDelete