IBM Mainframe Forum Index
 
Log In
 
IBM Mainframe Forum Index Mainframe: Search IBM Mainframe Forum: FAQ Register
 

export data to Excel using HTML


IBM Mainframe Forums -> PC Guides & IT News
Post new topic   Reply to topic
View previous topic :: View next topic  
Author Message
girias

New User


Joined: 09 Feb 2007
Posts: 26
Location: Chennai

PostPosted: Wed Mar 05, 2008 6:02 pm
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
stodolas

Active Member


Joined: 13 Jun 2007
Posts: 632
Location: Wisconsin

PostPosted: Wed Mar 05, 2008 6:36 pm
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

Global Moderator


Joined: 20 Oct 2006
Posts: 6966
Location: porcelain throne

PostPosted: Wed Mar 05, 2008 6:44 pm
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

Superior Member


Joined: 14 Mar 2007
Posts: 10873
Location: italy

PostPosted: Wed Mar 05, 2008 6:50 pm
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: 26
Location: Chennai

PostPosted: Wed Mar 05, 2008 6:58 pm
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
stodolas

Active Member


Joined: 13 Jun 2007
Posts: 632
Location: Wisconsin

PostPosted: Wed Mar 05, 2008 7:27 pm
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: 26
Location: Chennai

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

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

Active Member


Joined: 13 Jun 2007
Posts: 632
Location: Wisconsin

PostPosted: Wed Mar 05, 2008 7:39 pm
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
View previous topic :: :: View next topic  
Post new topic   Reply to topic View Bookmarks
All times are GMT + 6 Hours
Forum Index -> PC Guides & IT News

 


Similar Topics
Topic Forum Replies
No new posts How to save SYSLOG as text data via P... All Other Mainframe Topics 4
No new posts Store the data for fixed length COBOL Programming 1
No new posts Data set Rec-Cnt and Byte-Cnt Testing & Performance 2
No new posts SCOPE PENDING option -check data DB2 2
No new posts Check data with Exception Table DB2 0
Search our Forums:

Back to Top