Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Foxypreviewer don't release excell
Message
From
07/12/2011 09:23:54
 
 
To
07/12/2011 07:35:57
General information
Forum:
Visual FoxPro
Category:
Third party products
Environment versions
Visual FoxPro:
VFP 9 SP2
OS:
Windows 7
Miscellaneous
Thread ID:
01530369
Message ID:
01530520
Views:
51
>>>>>>Cesar, worked fine, just I had to change the line
>>>>>>loExcel.ActiveWorkbook.SaveAs(tcDestination, xlExcel9795)
>>>>>>by loExcel.ActiveWorkbook.SaveAs(tcDestination)
>>>>>>I am using Excel 2007
>>>>>>
>>>>>>Thanks
>>>>>
>>>>>Do you mean that only removing the 2nd parameter solved the issue ?
>>>>
>>>>Yes, with the second parameter I receive the message:
>>>>
>>>>OleIDDispatch exception code 0 from Microsoft Office Excel: It is not possible to obtain the property SaveAs of class workbook
>>>
>>>
>>>Thanks !
>>>I'll update FoxyPreviewer later tonight.
>>>
>>>Tomorrow there will be available a new release with some major changes, specially that from now on, people will not have to distribute the Report*.App files. Everything will come embedded in FoxyPreviewer.
>>>This change meant only 200kb in the APP, and will solve the issue that lots of people had, with wrong Report*.app files in their clients.
>>>Debugging will become much more easier, since everything will be in the same module, with available debug information.
>>>After this become stable, and tested by a considerable quantity of users, I'll publish a separate version of the APP, without the DebugInfo, to make it 50% smaller.
>>
>>Olá Antonio Carlos,
>>
>>I've applied your suggested fix to v2.88 that was uploaded yesterday. Can you test it and tell me how it goes ?
>>BTW, what's exactly the file format that it is generating if you don't specify the file format ?
>>
>>I'm feeling that this will not be too safe... Because looking at the documentation of MS Excel automation, it says that without the 2nd parameter it will generate the default Excel format. That means that depending on the Excel version used, it may generate a XLS or XLSX format.
>>That would not be a problem for people that will manipulate the data in their own machines, but if you plan to sen the worksheet to another person, I think that the pure XLS would be more recommended, because all the other EXcel compatible tools could open it.
>>
>>When you find some time, could you try that procedure again, and see if there is a specific parameter that would be safe to use in this case to generate the XLS ?
>>
>>Thanks in advance !
>>
>>Abraço
>>
>>César
>
>César, with version 2.88 behaves the same previous version. Following my code. This piece of code is inside SCAN, because I am generating several XLS files. To work fine I have to omit parameter "xlExcel9795" on the line loExcel.ActiveWorkbook.SaveAs(m.nmPlanilha+'.XLS', xlExcel9795).
>
>I have #DEFINE xlExcel9795 43 before SCAN. Maybe I am doing something wrong
>
>DO FOXYPREVIEWER.APP
>REPORT FORM relrepassecdlxcdl OBJECT TYPE 13 TO FILE (m.nmPlanilha+'.XML')
>DO FOXYPREVIEWER.APP WITH 'Release'
>IF !FILE(m.nmPlanilha+'.XML')
> MESSAGEBOX('Ocorreu um problema e não foi possível gerar a planilha no formato XML',48,'Atenção')
> EXIT
>ELSE
> loExcel.Workbooks.Open(m.nmPlanilha+'.XML')
> loExcel.ActiveWorkbook.SaveAs(m.nmPlanilha+'.XLS', xlExcel9795)
> loExcel.ActiveWindow.Close(.T.)
> IF !FILE(m.nmPlanilha+'.XLS')
> MESSAGEBOX('Ocorreu um problema e não foi possível gerar a planilha no formato XLS',48,'Atenção')
> EXIT
> ENDIF
>ENDIF
>
>After the XLS file is generated when I open with excel 2007 appears message "The file you are trying to open is on different format of specified by extension of the file. Verify if the file is corrupted and ...."
>I confirm YES and the file is OK.


Thanks !
I need to know if there is another option of parameter that we could use for the 2nd parameter, understand ? I need to generate a pure XLS.
Previous
Reply
Map
View

Click here to load this message in the networking platform