RBLibrary: ExcelWriter

Hi Simon!, Can I write Excel Formulas with your software?
And How can I do that?

Regards.

[quote=258344:@Gerardo García]Hi Simon!, Can I write Excel Formulas with your software?
And How can I do that?

Regards.[/quote]
Ok, I Answer myself:

xl.SetCellFormula(2, 20, "=SUM(R[-16]C:R[-1]C)") xl.SetCellStyleID(2, 20, "SBS000005")

But ow it Works?

For Example If I want to SUM from B12 to B300?
Thanks

The cell formula is relative to the cell itself.

So, the answer to your question will depend upon where the result should be displayed (i.e. which cell). If it is the cell B301 then the formula would be

=SUM(R[-288]C:R[-1]C)

You need to set up a variable in your writing software to calculate the start and end points.

[quote=258375:@Simon Berridge]The cell formula is relative to the cell itself.

So, the answer to your question will depend upon where the result should be displayed (i.e. which cell). If it is the cell B301 then the formula would be

=SUM(R[-288]C:R[-1]C)

You need to set up a variable in your writing software to calculate the start and end points.[/quote]
Thanks Simon, I got it. In fact I made a Variable in order to know how many rows Do I have and then pass it to the formula.

Thats cool, I ve read in another forum that Einhugur that developed a new excel classes that creates Native xlsx files, but I can’t find the link to download, I can only see the Old Excel Writer that generates a XML file, like Simon Berridge’s classes

xlsx files are in reality zipped files, they are easy to make
xls files where only retro-engeneered so more difficult to make.

I have not released yet, I stalled it a little because of Xojo’s 2016r4 new drawing system on windows, other plugins needed attention. But the Excel writer plugin is in really good shape and still coming soon.

Thanks Björn!, Its good to know that, And yes, Infact everyone are getting issues to adapt our codes to Newer version of Xojo :smiley: