.NET Imports and JadeDotNetType
Posted: Fri Oct 14, 2016 8:21 am
Hi,
Haven't really played with .Net imports so I'm a bit lost by the JadeDotNetType class and exactly how to use it.
Bit of background, I am writing an excel export. Currently we use csv, but I now have the need to format the output, with coloured headers, bold, totals etc..
It will generate files from the server as part of an overnight job, not the client PC, but I do not want to install office on the server.
Have found a product called GemBox that looks to fit the criteria, that will create Excel files for me without office installed.
So I have the library imported, and have managed to create a file, create a new worksheet and save it out to a file OK.
Trying to set values in the cells has me stumped now as the property I need to set has imported as a JadeDotNetType class.
The docs give the following info on the property CellRange.Value
public override Object Value { get; set; }
Property set will set value of multiple cells or of a merged range.
Property get has meaning only if range is Merged; otherwise, exception is thrown.
(http://www.gemboxsoftware.com/spreadshe ... _Value.htm)
So being an object it imports in Jade as:
Name: value_2 (14)
Class: CellRange ()
Type: JadeDotNetType
Access: public
Ordinal: 14
non-virtual embedded mapped
In their samples (http://www.gemboxsoftware.com/Spreadshe ... -World/601) they just set the property directly with the text, such as .value = "My text"; but being a JadeDotNetType object I have no such luck.
So how do I work with the JadeDotNetType object? - how can I tell it that this is text is should be taking?
Any pointers or help would be greatly appreciated
Thanks
Stephen
Haven't really played with .Net imports so I'm a bit lost by the JadeDotNetType class and exactly how to use it.
Bit of background, I am writing an excel export. Currently we use csv, but I now have the need to format the output, with coloured headers, bold, totals etc..
It will generate files from the server as part of an overnight job, not the client PC, but I do not want to install office on the server.
Have found a product called GemBox that looks to fit the criteria, that will create Excel files for me without office installed.
So I have the library imported, and have managed to create a file, create a new worksheet and save it out to a file OK.
Trying to set values in the cells has me stumped now as the property I need to set has imported as a JadeDotNetType class.
The docs give the following info on the property CellRange.Value
public override Object Value { get; set; }
Property set will set value of multiple cells or of a merged range.
Property get has meaning only if range is Merged; otherwise, exception is thrown.
(http://www.gemboxsoftware.com/spreadshe ... _Value.htm)
So being an object it imports in Jade as:
Name: value_2 (14)
Class: CellRange ()
Type: JadeDotNetType
Access: public
Ordinal: 14
non-virtual embedded mapped
In their samples (http://www.gemboxsoftware.com/Spreadshe ... -World/601) they just set the property directly with the text, such as .value = "My text"; but being a JadeDotNetType object I have no such luck.
So how do I work with the JadeDotNetType object? - how can I tell it that this is text is should be taking?
Any pointers or help would be greatly appreciated
Thanks
Stephen