Portal | IBM Manuals | Downloads | Products | Refer | Info | Programs | JCLs | Forum Rules*| Site Map | Mainframe CD 
IBMMAINFRAMES.com - IBM Mainframe Support Forums Index
 
Register
 
IBMMAINFRAMES.com - IBM Mainframe Support Forums Index FAQ Search Memberlist Usergroups Profile Log in to check your private messages Log in
 
export data to Excel using HTML

 
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> PC Tech Help & IT News
Author Message
girias

New User


Joined: 09 Feb 2007
Posts: 24
Location: Chennai

PostPosted: Wed Mar 05, 2008 6:02 pm    Post subject: export data to Excel using HTML
Reply with quote

Hi All,

I have a requirement which says,

1. A report needs to be converted to excel format and send via SMTP as an attachment.
2. The report (all the values in the excel file) in the attached excel file should be in read-only format. Receiver of the mail should not be able to modify the data in that.

I have done with the first one. Can any one please help me in the second requirement.

-Giri As
Back to top
View user's profile Send private message
References
stodolas

Senior Member


Joined: 13 Jun 2007
Posts: 647
Location: Wisconsin

PostPosted: Wed Mar 05, 2008 6:36 pm    Post subject:
Reply with quote

If you are exporting the data to a CSV for excel, because you can't export to a real excel doc, you can't do anything to enforce read only of the file. It is just a text file which has no form of READONLY management beyond the filesystem. If they receive the file in an email and copy it to their hard drive, the file becomes owned by their userid on that system and they can do what they want with it.
Back to top
View user's profile Send private message
dbzTHEdinosauer

Senior Member


Joined: 20 Oct 2006
Posts: 1639
Location: germany

PostPosted: Wed Mar 05, 2008 6:44 pm    Post subject:
Reply with quote

the only way you can enforce anything on a pc is to drive the process thru scripts.
Back to top
View user's profile Send private message
enrico-sorichetti

Global Moderator


Joined: 14 Mar 2007
Posts: 3168
Location: italy

PostPosted: Wed Mar 05, 2008 6:50 pm    Post subject: Reply to: export data to Excel using HTML
Reply with quote

since You are talking about a report
if Your organization really needs to send to a PC something read_only/readable/printable
it would be worth investigating PDF format
PDF's can be tagged with many protection attributes,
which should satisfy Your organization security needs
Back to top
View user's profile Send private message
girias

New User


Joined: 09 Feb 2007
Posts: 24
Location: Chennai

PostPosted: Wed Mar 05, 2008 6:58 pm    Post subject: Reply to: export data to Excel using HTML
Reply with quote

We can directly export data to real excel sheet using HTML tags embedded in the data and setting the content-type and content-disposition for the SMTP proc.

I have read in some forum (not sure, used Google search) formatting excel using mso-properties. One of such formatting is mso-protection which can be used in Excel to protect the contents. But not sure how to use it.
Back to top
View user's profile Send private message
Moved: Wed Mar 05, 2008 7:12 pm by superk From Mainframe COBOL to Off Topics
stodolas

Senior Member


Joined: 13 Jun 2007
Posts: 647
Location: Wisconsin

PostPosted: Wed Mar 05, 2008 7:27 pm    Post subject:
Reply with quote

HTML or XML? Because if it is HTML, it is still not a native excel format.
Back to top
View user's profile Send private message
girias

New User


Joined: 09 Feb 2007
Posts: 24
Location: Chennai

PostPosted: Wed Mar 05, 2008 7:32 pm    Post subject:
Reply with quote

Hi Steve, Its HTML.
Back to top
View user's profile Send private message
stodolas

Senior Member


Joined: 13 Jun 2007
Posts: 647
Location: Wisconsin

PostPosted: Wed Mar 05, 2008 7:39 pm    Post subject:
Reply with quote

Then the document is not an excel document, but an HTML document. HTML files are just plain text, not binary. Text files have no mso-properties that can force read-only. Your requirement for read-only is unachievable with your current output format.
Back to top
View user's profile Send private message
Moved: Wed Mar 05, 2008 7:47 pm by superk From Off Topics to PC Tech Help & IT News
Display posts from previous:   
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> PC Tech Help & IT News All times are GMT + 6 Hours
Page 1 of 1