Richard Teasdale
asked on
replacing column headings
HI: I am moving from a manual export process( sql to crystal to excel) to an automated sql to foxpro to excel export.
Problem is that foxpro truncates column headings to 10 characters. My user is moaning that he needs the full heading 'like it was'. Apart from telling him to get real , does anybody know of a way of replacing the heading (top) row of data in an automatically produced excel sheet (ie not a template or pre existing document) with an array of other, fixed, data (eg replace cell a1 "line_price" with "line price net of vat"). I then need to email the document so ideally get it all to happen in one process. Thanks!
Problem is that foxpro truncates column headings to 10 characters. My user is moaning that he needs the full heading 'like it was'. Apart from telling him to get real , does anybody know of a way of replacing the heading (top) row of data in an automatically produced excel sheet (ie not a template or pre existing document) with an array of other, fixed, data (eg replace cell a1 "line_price" with "line price net of vat"). I then need to email the document so ideally get it all to happen in one process. Thanks!
ASKER
Thanks for the swift response!
OK - the layout of the sheet will be fixed, so the array can be fixed too. I do not want to actually open the excel doc; I would hope to write a VB script or similar that ran from within foxpro. The client imports the excel sheet into Access so he is wanting the mapping to be unaffected. I have done everything else - but the actual text of the heading stumps me!
I have done similar with csv where I had a file with just a single row of set data , then with the target file I stripped out the first row and appended the row from the substitute file. It is if an excel doc (excel 2007) would allow me to handle it in the same way!
Thanks again
OK - the layout of the sheet will be fixed, so the array can be fixed too. I do not want to actually open the excel doc; I would hope to write a VB script or similar that ran from within foxpro. The client imports the excel sheet into Access so he is wanting the mapping to be unaffected. I have done everything else - but the actual text of the heading stumps me!
I have done similar with csv where I had a file with just a single row of set data , then with the target file I stripped out the first row and appended the row from the substitute file. It is if an excel doc (excel 2007) would allow me to handle it in the same way!
Thanks again
Sorry - I don't know VBS.
ASKER
No problem - thanks for your interest!
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER
Sounds like a plan! Thank you very much!
For instance, are the headings going to be fixed, or do you need a Find and Replace function?
A bit more detail is needed.