blanchap
30th November 2011, 23:38
Hi all,

i have a question regarding ttstpconv that i was not able to find in the forum.
I've created a device to print a Baan report into Excel and it's working.

I'm using the ttstpconv with the argument ASCII: excel

Now, i'm trying to use the same method but to print in an existing excel file.

What i did is change the argument from ASCII:excel to ASCII:Book1.xlsx
When i print the report, it does open my file but does not put the data inside.
I even tried ASCII:Book1.xlsx %s but with the same results.

Am i missing something or it just not possible to do so?

Regards.

PB

ulrich.fuchs
1st December 2011, 11:27
Yes, you're missing something. What goes behind the ASCII: is the *application* you are using to open the file created by Baan. It's not the filename. So you cannot open an existing file that way.

blanchap
1st December 2011, 15:29
So there is no way to append data to an existing file using that process?

Like i said, when i put the file name in the ASCII path, it does open the file.

PB

mark_h
1st December 2011, 15:49
Yes - there is, but requires some work. What you do is write a macro to do what you want and launch that macro. What we did was write our own version of ttstpconv(examples in code and utilities). It takes the input file name from the device, saves gets the location of the macro and location to put the new report, downloads the report to the specified location, and then launches the excel macro. The macro could then open the existing report and the new report, which could then be merged together into one report. Works fine for us. We created a table to hold the report name, macro location and download file location. Then using the "input filename" we can have the same report run different macros. Just a thought, but does require some work to get it setup and working.