i am trying to call excel from visfox to help in converting a csv file to an xls. the code could be in vb, and i can convert that if needed.
situation is i receive a text file that is a semi-colon seperated file (as it has some commas in it that bugger the columns up) so i wrote a text converted to change all the commas to a space and then the semi-colons to a comma. now i have a csv that excel will open.
now i have to reach out to excel, pass the name of the file, tell it to add a column at AB, then save the file as an .xls.
Or, alternatively, there are other VFP forums where more VFP Excel Automation code examples are given, but referencing them specifically here would not be an ethical use of this forum.
One note - After having done a LOT of VFP Automation of Excel myself, I generally proceed along the following steps.
I first do the very same operations that I want to perform manually in Excel (no VFP involved at all) and record the actions as a Macro.
Then, when complete, I Stop Recording the Macro and examine it within Excel to see how it was done.
Finally I go into VFP and write the Excel Automation code to do the very same thing using the Macro code as a guide.