I am currently extracting the Pin List - Pin Names in Altium Designer that uses DelphiScript (not Delphi). DelphiScript and Delphi has differences and I believe one of them is the file I/O component. According to the Altium Docs for DelphiScript, only text files and csv files can be produced. In producing an output file .csv, saving is as easy as throwing text that are comma delimited and then saving with an extension '.csv'. My problem now is how to create a .xls file without importing and/or downloading plugins/extensions like eDocEngine VCL, LibXL, TQExport4Xlsx. Tried declaring TBook, TSheet, TgtXLSEngine or other ways to create the spreadsheet but error says it is an undeclared identifier. Do you guys have any idea?
Report Writer Code Snippet:
Procedure BeginReportPinList(AFilename: String);
Begin
gv_FileName := AFilename + '.csv';
AssignFile(gv_FileReport, gv_FileName);
Rewrite(gv_FileReport);
End;
Procedure WriteReportDUT(AReport : String);
Begin
WriteLn(gv_FileReport, Format('%s', [AReport]));
End;
Procedure EndReport(Dummy : Boolean);
Begin
CloseFile(gv_FileReport);
End;
String Parser Code Snippet that calls above procedures:
if dutlistX.Count = 1 then
Begin
PinFilename := copy(gv_Board.FileName, 1, Pos('-05', gv_Board.FileName)-1) + '-14';
BeginReportPinList(PinFilename);
For I := 0 To finalreport.Count - 1 Do
Begin
WriteReportDUT(finalreport[I]);
End;
EndReport(0);
End;