Rating:
0
Joined: Mar 24, 2020
Company: 1C Innovation
Hello everyone! Is there an easier way than using Microsoft Office Excel COM object to export a report from 1C in Excel format? I can see in menu that it is possible to save as Excel2007 sheet-... (*.xlsx). How can I do the same in my own common module to use Scheduled Jobs? Anyone can show me some code sample, pls?
newSpreadsheetDocument = New SpreadsheetDocument;
// Here is the code that populates your report with data
TempFileName = GetTempFileName("xlsx");
newSpreadsheetDocument.Write(TempFileName, SpreadsheetDocumentFileType.XLSX);
Thus, first we generate a report, and then save it in the desired format.
it depends on where/how often you want to run this procedure. You can set up an automated routine (reglament) task which will run at certain periods of time. And put the above code in this procedure.