PDA

View Full Version : BOLDing cells from an ILE-RPG program.



Guest.Visitor
07-02-2001, 01:54 PM
<DIV><FONT face=Arial size=2>Robert,</FONT></DIV> <DIV></DIV> <DIV><FONT face=Arial size=2>I think you would go in way over your head trying to create an Excel spreadsheet object from RPG.</FONT></DIV> <DIV></DIV> <DIV><FONT face=Arial size=2>You have a couple of options here, and since you are really creating an ASCII/Tab-Delimited file and not a spreadsheet the answers are pretty much all in Excel. </FONT></DIV> <DIV></DIV> <DIV><FONT face=Arial size=2>1. Create a spreadsheet that downloads it's data directly from the AS/400 viaan ODBC data driver, Client Access has one. Set up the resulting data fields to conditionally format a cell based upon it's contents.</FONT></DIV> <DIV></DIV> <DIV><FONT face=Arial size=2>2. Create a macro that reads the tabbed file and then conditions the formatting of the cell for each record you read in.</FONT></DIV> <DIV></DIV> <DIV><FONT face=Arial size=2>I have done both and I think #1 is easier.</FONT></DIV> <DIV></DIV> <DIV><FONT face=Arial size=2>Bill</FONT></DIV> <BLOCKQUOTE style="BORDER-LEFT: #000000 2px solid; MARGIN-LEFT: 5px; MARGIN-RIGHT: 0px; PADDING-LEFT: 5px; PADDING-RIGHT: 0px"> I have created an ile rpg program that creates a Microsoft Excel spreadsheet(tab separated) from an AS/400 file. The users love it, but(and you just knew there would be one) they would like me to highlight(BOLD) certain cells if they exceed certain conditions. I have tried highlighting(BOLD) some fields in an existing spread sheet, copying that from the IFS to a database file on the 400 to see if I can find the control codes that cause highlighting(BOLD) in Excel. I am not sure I can do this. Does anyone have any experience with such things?</P></BLOCKQUOTE>

Guest.Visitor
07-03-2001, 05:20 AM
Hi Bill, Thanks for the reply. You are correct about the problems associated with creating a formatted Excel document. Way too much work for a small return. I naively thought that there would be a hex character(suffix/prefix/both) that would allow such BOLDing. Of the 2 options you presented, I also agree that option 1, odbc makes more sense , but unfortunately not the environment I am currently working in. A long story that I won’t bore you with. Because the decision must be made on BOLDing these cells at the time the record is being created, my fall back position is to concatenate a special character (say an *) to the prefix and suffix of the value of the cell. This is not perfect but should allow easy identification of the field value that caused this record to be reported(aka net change). Thanks again for your reply. Bob.

Guest.Visitor
07-03-2001, 07:05 AM
<DIV><FONT face=Arial size=2>Bob,</FONT></DIV> <DIV></DIV> <DIV><FONT face=Arial size=2>I recommend you take a look at the conditional formatting in the Excel help documentation. You can even ask the "Paper Clip" expert about it. It will do what you are needing to do.</FONT></DIV> <DIV></DIV> <DIV><FONT face=Arial size=2>Bill</FONT></DIV> <BLOCKQUOTE style="BORDER-LEFT: #000000 2px solid; MARGIN-LEFT: 5px; MARGIN-RIGHT: 0px; PADDING-LEFT: 5px; PADDING-RIGHT: 0px"> Because the decision must be made on BOLDing these cells at the time the record is being created, my fall back position is to concatenate a special character (say an *) to the prefix and suffix of the value of the cell. This is not perfect but should allow easy identification of the field value that caused this record to be reported(aka net change).</P></BLOCKQUOTE>

Guest.Visitor
07-05-2001, 06:34 AM
Hi All, I have created an ile rpg program that creates a Microsoft Excel spreadsheet(tab separated) from an AS/400 file. The users love it, but(and you just knew there would be one) they would like me to highlight(BOLD) certain cells if they exceed certain conditions. I have tried highlighting(BOLD) some fields in an existing spread sheet, copying that from the IFS to a database file on the 400 to see if I can find the control codes that cause highlighting(BOLD) in Excel. I am not sure I can do this. Does anyone have any experience with such things? Thank you Bob.