Quantcast
Channel: NAV Three Tier — mibuso.com
Viewing all articles
Browse latest Browse all 10032

NAV 2013 - Modify Excel Buffer to apply border with OpenXML

$
0
0
Hello,

I try to use Excel Buffer to create an Excel file with format modifications to apply. More specially, to have cells with borders. After many tries and searches, i have modified the function GetCellDecorator and add this lines at the end :

Border := XlWrkShtWriter.DefaultCellDecorator.Border.CloneNode(TRUE);

BorderColor := BorderColor.Color;
BorderColor.Auto:=BooValue.FromBoolean(TRUE);

Border.LeftBorder.Style:=BorderStyle.Thin;
Border.LeftBorder.Color:=BorderColor;

Decorator.Border:=Border;

The variables created are :

Border DocumentFormat.OpenXml.Spreadsheet.Border
BorderColor DocumentFormat.OpenXml.Spreadsheet.Color
BorderStyle DocumentFormat.OpenXml.Spreadsheet.BorderStyleValues
BooValue DocumentFormat.OpenXml.BooleanValue

But, i have this error raising : DocumentFormat.OpenXML.Spreadsheet.LeftBorder.set_style failed with this message. The type of one or more arguments does not match the method's parameter type.

Does someone know what i do wrong?

Thanks

Viewing all articles
Browse latest Browse all 10032

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>