Home » Other » Test » Excel Attachement showing warning Message (win 7)
Excel Attachement showing warning Message [message #663041] Fri, 19 May 2017 05:35 Go to next message
Md Reyaz
Messages: 2
Registered: May 2017
Junior Member
Dears,

my requirement is to generate Excel file and send it as attachment.

I am able to generate Excel file but,while opening the attachment i am getting one warning message.

below is the warning message.can you please help on this.


the file format and extension of 'abc.xls' don't match.the file could be corrupted or unsafe.Unless you trust its source,don't open it.d you want to open it.


Thannks,

Md Reyaz
Re: Excel Attachement showing warning Message [message #663042 is a reply to message #663041] Fri, 19 May 2017 05:51 Go to previous messageGo to next message
Bill B
Messages: 1971
Registered: December 2004
Senior Member
It means that excel sees that the extension is xls but the data in the file doesn't match the structure of the xls. How are you generating the xls file? For example if you are just producting a comma delimited file and you slap an xls extension, it is not an xls, it is still a csv.
Re: Excel Attachement showing warning Message [message #663043 is a reply to message #663041] Fri, 19 May 2017 06:14 Go to previous messageGo to next message
Michel Cadot
Messages: 68716
Registered: March 2007
Location: Saint-Maur, France, https...
Senior Member
Account Moderator

Note that:
1/ the Test (sub-)forum is just to test the post itself NOT to post a real question; for real question post it in the appropriate (sub-)forum
2/ as far as I can see, this question is not related to Oracle and so has nothing to do with this site.

Re: Excel Attachement showing warning Message [message #663044 is a reply to message #663042] Fri, 19 May 2017 07:19 Go to previous messageGo to next message
Md Reyaz
Messages: 2
Registered: May 2017
Junior Member
Thanks for quick response..!!

I am producting by using Chr(9) while generating Excel by using UTL_SMTP API.

Yes,actualy i slap it as .xls only.

How can we generate .xls file,is their any alternative for this.
Re: Excel Attachement showing warning Message [message #663045 is a reply to message #663044] Fri, 19 May 2017 08:50 Go to previous message
Bill B
Messages: 1971
Registered: December 2004
Senior Member
The easiest way is to simply put an extension of .txt on the file and keep using the tab delimited fields. Excel will open it with no problems. Depending on your Database level, there are open source packages that can be used to generate actual xls file. If you want to go that route see the link

https://technology.amis.nl/2011/02/19/create-an-excel-file-with-plsql/


Previous Topic: editing test
Next Topic: Test
Goto Forum:
  


Current Time: Thu Nov 21 07:21:03 CST 2024