Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Chris Miller on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Excel Automation in VFP 8

Status
Not open for further replies.

oldjr49

Programmer
Apr 16, 2013
3
US
Have a VFP 8 program that outputs to excel and then opens excel to format the file and save it back. It has been working fine until a new printer was installed. Konica Minolta 652/602 SeriesPS. After installing the printer the excel file will not save back. There is a temp file open showing in the folder where the excile file sits and until the temp file is deleted they cannot open the excel file. Once the temp file is deleted and the excel file is opened up it is not formatted.
Solution?
 
No idea. What happens, if you open Excel manually, no file, just Excel? How does the printer (river) get in the way?

Bye, Olaf.
 
When opening manually it is the raw data copy to filename.xls type xl5.
We know it is the printer because when they remove it the program works as it was previously. They reinstall the printer and it doesn't work.
 
I meant opening Excel purely, you get an empty sheet and nothing else, don't you? What does the printer have to do with this?
Do you format the excel sheet to fit the printer page size?
How does the printer come in play?

That's what you have to find out. I fear I can't help you.

If you automate excel, make it visible before doing your usual stuff. SET STEP ON, debug what happens.

Bye, Olaf.
 
Yes, that's right. Basically, you've got to find out whether it's caused by something in your Foxpro automation code, or within your Excel / Windows / printer driver.

That's why you should open the sheet manually, then assign the printer (if not already done). If you see the same problem, then you have eliminated Foxpro from the equation.

I don't understand what you mean by "When opening manually it is the raw data copy to filename.xls type xl5". Doesn't make much sense to me.

Mike

__________________________________
Mike Lewis (Edinburgh, Scotland)

Visual FoxPro articles, tips, training, consultancy
 
What I meant is that you see the data pre-formatted. The formatting code runs but errors when it goes to save the changes to the excel file. Unfortunately, I am in CA and the application is in KY and I have no way to trace it since the printer is there.

This is the error: The Fox Error is 1426 : OLE error code 0x80010105: The server threw an exception. Something about printable area and outside the margins.

Anyway, a solution has been found. By installing another simple printer onto the users PCs it is working again.

Thnak you everyone for your help.
 
printable area.

Ah, that's how the printer comes into play, you format the data to fit a page size? Something like that.
Then a new printer with smaller paper size or higher margin could cause that error, yes.
Well, the error itself and it's message are very helpful and pointing in that direction, don't they?

Bye, Olaf.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top