by reinaldocrespo » Mon Jan 17, 2011 3:26 pm
ukservice;
You make a legitimate point. The change to treport that exports to excel using tfilexls class has been around for many years now. Why hasn't it been officially integrated? There is no logical answer.
Anyway- i do have it working. At least with Ramon Avendaño's tfilexls class. It works quite well. You need to add to your project the following prgs:
tSalxls.prg
mreport.prg
xlserror.prg
xlsfunc.prg
pdreport.prg
I must admit that it's been working so well for so long now, that I can't remember exactly how it works. Basically mreport inherits from treport taking care of everything and including a new method: :Saveas() where all you need is to call seding "excel" as parameter. Like this:
oreport:saveas( "excel" ) ...and you get a beautiful excel spreadsheet identical to the report, including lines, fonts, etc...
pdreport changes rptbegin(), rptend()... to call the new class declared in mreport. Some like that. But I've made so many changes to the prgs that ties it to the preview which I also had to change to allow for my own botton bar, I'm afraid my prgs will not work for you.
Maybe someone/somewhere has the original prgs from Ramon. I -myself got help on these very same forums years ago with the same subject and that's how I got the prgs in the first place. I'm sure many people are using Ramon's excel class.
Reinaldo.