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. (Last updated on : November 16, 2018).
Unfortunately, activation email could not send to your email. Please try again.
Syncfusion Feedback

R1C1 Formula from DataTable

Thread ID:

Created:

Updated:

Platform:

Replies:

61332 May 23,2007 03:02 PM UTC May 24,2007 01:02 PM UTC ASP.NET Web Forms (Classic) 1
loading
Tags: XlsIO
gdo
Asked On May 23, 2007 03:02 PM UTC

I've got something like that :

DataTable dt = new DataTable("REQresponse");
dt.Columns.Add("item_id");
dt.Columns.Add("conv_price");
dt.Columns.Add("formula");
foreach (DataRow itemDr in rows)
{
dt.ImportRow(itemDr);
dt.Rows[dt.Rows.Count - 1]["formula"] = "=LC(-2)*LC(-1)";
}
marker.AddVariable("REQresponse" + supDr["sup_id"].ToString(), dt);

I've got 2 problems with the R1C1 formula.
First of all, the formula is localized, R1C1 for english system, L1C1 for french system etc....
The second problem is that it says :
Syncfusion.XlsIO.Implementation.Exceptions.ParseException:
LC isn't custom function. at position 1. Formula: LC(-2)*LC(-1), Position: 3

How to put a formula in a cell on each row created from the population of an excel from a DataTable ?

Thanks,
Greg

Melba Winshia [Syncfusion]
Replied On May 24, 2007 01:02 PM UTC

Hi Greg,

I created a sample to put a formula in a cell on each row created from the population of an excel from a DataTable. Here is the sample for your reference:

http://websamples.syncfusion.com/samples/XlsIO.Web/4.4.0.51/61332/main.htm

Note:
----

Please use R1C1 and not L1C1

Please take a look at the sample above and kindly let me know if this helps you.

Thanks,
Melba

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.

Warning Icon 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.Close Icon

;