Reply to topic  [ 2 posts ] 
Cell Formatting 
Author Message

Joined: Thu Apr 14, 2016 11:59 am
Posts: 7
Reply with quote
Post Cell Formatting
I am trying to do some cell formatting and am having a hard time getting it to work correctly.

I have a column of percentages. I set the column to be formatting as %. I then want the last row to be underlined with a border. When I do that, the percent column (or any column i have applied formatting to) go back to "raw" data.

' set column to be %
xlsTable1.easy_getColumnAt(13).setStyle(xlsStylePercent)
'write column values here...

' underline last row items (curcol = current column)
For myCol = 11 to curCol
xlsTable1.easy_getCell(Row, myCol).setStyle(xlsBorderBottom)
Next
' sum columns...
xlsTable1.easy_getCell(Row,12).setValue("=SUM(" & ColumnLetter(13) & StartRow & ":" & ColumnLetter(13) & Row & ")")
xlsTable1.easy_getCell(Row,13).setValue("=SUM(" & ColumnLetter(14) & StartRow & ":" & ColumnLetter(14) & Row & ")")
' make the sum row bold
xlsTable1.easy_getRowAt(Row).setStyle(xlsStyleBold) ' this removes the % formatting in column 13 and the underline..

Thoughts?


Fri Jul 15, 2016 2:49 am
Profile

Joined: Thu Jun 02, 2011 6:17 pm
Posts: 1
Reply with quote
Post Re: Cell Formatting
This line of code:
xlsTable1.easy_getColumnAt(13).setStyle(xlsStylePercent)
sets the xlsStylePercent style only on the undefined cells in column 13.

Apply xlsStylePercent also in the code that write column values:
'write column values here...


Fri Aug 05, 2016 8:36 am
Profile
Display posts from previous:  Sort by  
Reply to topic   [ 2 posts ] 

Who is online

Users browsing this forum: No registered users and 1 guest


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Jump to:  
Powered by phpBB © 2000, 2002, 2005, 2007 phpBB Group.
Designed by STSoftware for PTF.