Create a file with formulas on the iSeries and send to Excel.

20 pts.
Tags:
AS/400
iSeries
Microsoft Excel
SQL
I can create a file in SQL that has formulas in it (i.e. '=A1*B1') and I can send them to my PC and open them in Excel. However, the formulas are showing instead of the results. If I click inside the cell and hit Enter, I get the value instead of the formula. BUT, I want this automated and don't want a macro, so I want this to be opened to show the formula result instead of the formula without doing anything. I tried using CAST to a few other types, but that didn't work. It works if I send it as a HTML, but would prefer the xls extension, if possible. Thanks for any thoughts on this. -Jeff

Answer Wiki

Thanks. We'll let you know when a new response is added.

I am not sure if you code using RPG, but if so you can use the HSSF API’s created by Scott Klement to create fully formatted Excel spreadsheets from an RPG program. This includes formulas, as well as lots of other formatting options. There are three articles that he wrote to describe the basics. If you are interested search for HSSF in this wesbite. I know I posted links to the articles on another thread.

I takes some time to understand and set up (the code is downloadable with a working exmaple), but it is the best approach I found for allowing you to create truly formatted excel spreadsheets (not .csv files).

Discuss This Question:  

 
There was an error processing your information. Please try again later.
Thanks. We'll let you know when a new response is added.
Send me notifications when members answer or reply to this question.

REGISTER or login:

Forgot Password?
By submitting you agree to receive email from TechTarget and its partners. If you reside outside of the United States, you consent to having your personal data transferred to and processed in the United States. Privacy

Forgot Password

No problem! Submit your e-mail address below. We'll send you an e-mail containing your password.

Your password has been sent to:

To follow this tag...

There was an error processing your information. Please try again later.

REGISTER or login:

Forgot Password?
By submitting you agree to receive email from TechTarget and its partners. If you reside outside of the United States, you consent to having your personal data transferred to and processed in the United States. Privacy

Thanks! We'll email you when relevant content is added and updated.

Following