export report(persian data) to excel office 2007 (1 Viewer)

Naqibullah

Registered User.
Local time
Today, 16:14
Joined
Feb 7, 2013
Messages
86
Dear valued colleagues,
hope everyone is doing well, i have created a report in an access database, in this report i have placed a button which should export this current report to ms excel, it is to mentioned i have persian data in my database, but it does not allow me to export to excel(error 2282), i have exported the query based on which this report is to excel, but the exported file included only question marks but not my data. following is my code to export report to excel

DoCmd.OutputTo acOutputReport, MaterialReport, acFormatXLS, ""

but it gives following error no. 2282, format is not available

and the following code

DoCmd.OutputTo acOutputquery, Materialquery, acFormatXLS, ""

exports to excel but all data is converted to question marks

please help me to sort out this

Regards
 

spikepl

Eledittingent Beliped
Local time
Today, 13:44
Joined
Nov 3, 2010
Messages
6,142
You are mixing too many things in one go- split them.

If you open the report does it display OK?
If you export a small table of plain numbers to excel does it export ok, docmfd.tranferspreadsheet?
If you export some table containing persian dates, using tranferspredsheet, does it transfer ok?
 

Naqibullah

Registered User.
Local time
Today, 16:14
Joined
Feb 7, 2013
Messages
86
Dear Spikepl, thank you for the reply!!!

i don't mean date i mean data i.e. that names, father names, and other things are written in persian language i.e. right to left language. and regarding your points i would like to say.

a.if i open the report every thing is displayed, no problem is there,
b.if i export some plain numbers using docmfd.tranferspreadsheet, it does export without problems,
c.but if export my data i.e persain data using tranferspredsheet or output to it does export but instead of persian data i.e name, father name etc. it displays question marks
d.But if i go to navigation pane and write click on the query and say export, it exports everything properly, but using a button it does not. hope my explanation shed light on the scenario

Regards
 
Last edited:

Users who are viewing this thread

Top Bottom