Author |
Message |
masseym
Joined: Thu Apr 14, 2016 11:59 am Posts: 7
|
Accounting Formatting
Using Classic ASP, I would like to format a few cells with Accounting formatting ($ left aligned, #.## right aligned + () for negative numbers). How would I accomplish that?
Thanks.
|
Thu Apr 14, 2016 11:59 am |
|
|
oana
Joined: Wed Nov 07, 2007 4:42 am Posts: 67
|
Re: Accounting Formatting
|
Fri Apr 15, 2016 6:25 pm |
|
|
masseym
Joined: Thu Apr 14, 2016 11:59 am Posts: 7
|
Re: Accounting Formatting
I have reciewed that MANY times. I still can't figure out how to apply accounting formatting. I have been able to implement currency formatting, just not accounting format.
|
Fri Apr 15, 2016 6:52 pm |
|
|
oana
Joined: Wed Nov 07, 2007 4:42 am Posts: 67
|
Re: Accounting Formatting
Please try to use ExcelStyle.setFormat("_($* #,##0.00_);_($* (#,##0.00);_($* "-"??_);_(@_)") method.
|
Sat Apr 16, 2016 12:12 am |
|
|
masseym
Joined: Thu Apr 14, 2016 11:59 am Posts: 7
|
Re: Accounting Formatting
This works PERFECTLY except when a cell contains a formula. is there a way to format cells with formulas?
|
Sat Apr 16, 2016 4:54 pm |
|
|
masseym
Joined: Thu Apr 14, 2016 11:59 am Posts: 7
|
Re: Accounting Formatting
Figured it out. Have apply the formatting BEFORE setting the values. Also, do you have a table of similar codes for other fomatting options?
|
Sat Apr 16, 2016 8:01 pm |
|
|
oana
Joined: Wed Nov 07, 2007 4:42 am Posts: 67
|
Re: Accounting Formatting
You can do the formatting in Microsoft Excel. Right click on the cell / Format Cells / choose your formatting / then select "Number" tab / "Custom" category. Copy paste the characters in "Type:" textbox in your code.
|
Sun Apr 17, 2016 3:08 pm |
|
|
masseym
Joined: Thu Apr 14, 2016 11:59 am Posts: 7
|
Re: Accounting Formatting
but the whole point is to do it programatically lol. that is why we purchased the component - to export excel formatted the way we want.
|
Sun Apr 17, 2016 3:10 pm |
|
|
oana
Joined: Wed Nov 07, 2007 4:42 am Posts: 67
|
Re: Accounting Formatting
You misunderstood. You are doing it programmatically. You are only using Microsoft Excel to find the predefined Excel formats. Then you are applying them, programmatically, with EasyXLS. The Excel number formats are unlimited and you can make unlimited combinations with them.
|
Wed May 04, 2016 9:18 am |
|
|