We use cookies to give you the best experience on our website. If you continue to browse, then you agree to our privacy policy and cookie policy.
Unfortunately, activation email could not send to your email. Please try again.

Currency Format in Template

Thread ID:

Created:

Updated:

Platform:

Replies:

12599 Apr 4,2004 05:31 PM Apr 4,2004 11:13 PM Windows Forms 1
loading
Tags: XlsIO
Administrator [Syncfusion]
Asked On April 4, 2004 05:31 PM

Hi, I''m trying to format a column in my excel documents to accept currency. I tried setting the format for the column in the template and then insert strings but it just comes out as a string. Is there another step I need to take to enter currency? Also, I am going to need to create a formula row that calculates the totals from a couple of the columns could you give me an example of the formula cell? Thanks Andy Johnson

Administrator [Syncfusion]
Replied On April 4, 2004 11:13 PM

Hi Andy, The formatting is not applied when you insert strings into cells with currency format. If you want to insert strings use the value2 property. Here is the code snippet. If you have numbers then use number. Currently you must be using mySheet.Range["C1"].Text = "3"; Instead use this, mySheet.Range["C1"].Value2 = "3"; or mySheet.Range["C2"].Number = 4; Regarding the formula cell, you can enter the formula in the template. Then just fill the spreadsheet with the data. The resulting spreadsheet created using ExcelRW will have the values computed when you open it. I have attached a small sample demonstrating both currency format and formula cells. TemplateCurrencyCell_Forum_8207.zip A few notes on the sample 1) The cells C1:C4 were formatted as currency using template. 2) The formula for cells D1:D4 were set as A1+A2 , .....A4+D4. 3) A new formula is inserted in cell C3 using ExcelRW API. Hope i understood your requirements correctly. Please let me know if you have any other questions. Best regards, Stephen. >Hi, > >I''m trying to format a column in my excel documents to accept currency. I tried setting the format for the column in the template and then insert strings but it just comes out as a string. Is there another step I need to take to enter currency? > >Also, I am going to need to create a formula row that calculates the totals from a couple of the columns could you give me an example of the formula cell? > >Thanks >Andy Johnson

CONFIRMATION

This post will be permanently deleted. Are you sure you want to continue?

Sorry, An error occured while processing your request. Please try again later.

You are using an outdated version of Internet Explorer that may not display all features of this and other websites. Upgrade to Internet Explorer 8 or newer for a better experience.

;