//Dynamics
365 for finance and operation
//Setting Up range for collection of cells to do style/format
OfficeOpenXml.ExcelRange cellRange;
cellRange = Worksheet.get_Cells().get_Item("A4:D5");
Style.ExcelFont lisStyle = cell.Style.Font;
lisStyle.Bold = true;
lisStyle.Size = 12;
lisStyle.UnderLineType = true;
//Setting Up formula in excel cell
OfficeOpenXml.ExcelRange cellRange;
cellRange = Worksheet.get_Cells().get_Item(currentRow, 4);
cellRange.formula = "=SUM(D2:D10)";
//Setting Up format in excel cell
var column =
cell.get_Worksheet().Column(cell.get_Start().get_Column());
var columnStyle =
column.get_Style();
var columnNumberFormat =
columnStyle.get_Numberformat();
columnNumberFormat.set_Format(DateFormatString);
columnStyle.set_HorizontalAlignment(ExcelHorizontalAlignment::Right);
Hi,
ReplyDeletewhen i setup the formula it gives the value when i click "enable editing in the excel".
and for number formatting for real can i specify the format such as "0.00" by repalcing the dateformatString..
Thanks in advance
Hi,
ReplyDeleteMean to say, not able to see formula on EXCEL. Beside its showing value alone?.
Number formatting for real - Yes
Thanks