News:

Masm32 SDK description, downloads and other helpful links
Message to All Guests
NB: Posting URL's See here: Posted URL Change

Main Menu

fsincos - draw a circle

Started by jj2007, October 01, 2013, 08:08:20 AM

Previous topic - Next topic

jj2007

Quote from: dedndave on October 03, 2013, 08:40:23 AM
it's probably compatible with some version of excel
the problem is - there are so many flavours of exel   :P
The MasmBasic interface works fine with Excel 2007, 2010 and even the Win7-64 starter edition of Excel. So the problem is clearly in LibreOffice's court :bgrin:

japheth

Quote from: Gunther on October 02, 2013, 08:48:00 PM
... but the Colosseum is a bad joke and nothing else.

This "nothing else" term, isn't that the equivalent of "Basta!" in German ( and Italy )?  :icon_mrgreen:

IMO this sample is not even remotely suited as an example for someone who wants to learn assembly - to suggest the opposite as you did sounds like a funny joke to me.


Gunther

Quote from: jj2007 on October 03, 2013, 03:21:10 PM
The MasmBasic interface works fine with Excel 2007, 2010 and even the Win7-64 starter edition of Excel. So the problem is clearly in LibreOffice's court :bgrin:

That seems so.

Quote from: japheth on October 03, 2013, 06:31:42 PM
This "nothing else" term, isn't that the equivalent of "Basta!" in German ( and Italy )?  :icon_mrgreen:

IMO this sample is not even remotely suited as an example for someone who wants to learn assembly - to suggest the opposite as you did sounds like a funny joke to me.

Basta is Basta. But joke apart. It's clear that the entire thread is about programming and it is probably better placed inside the Workshop. No question. But your Colosseum proposal is a bit weird (what else, to say it with George Clooney).

Gunther
You have to know the facts before you can distort them.

TWell

jj2007,

If you request 'selection' after command '[NEW(1)]' you can get [workbook]sheet name and correct letters for RxCx after '!' ?

jj2007

Quote from: TWell on October 03, 2013, 08:41:17 PM
jj2007,

If you request 'selection' after command '[NEW(1)]' you can get [workbook]sheet name and correct letters for RxCx after '!' ?

Try xlsSysRead$:
        xlsConnect Mid$(esi, ecx, edx-ecx)
        PrintLine "Select", Tb$, xlsSysRead$("Selection()")
        xlsCommand '[Select("R16C4")]'
        PrintLine "Select", Tb$, xlsSysRead$("Selection()")
        xlsWrite "Masm32 is great"

Output:
Select  [Book20]Sheet1!R1C1
Select  [Book20]Sheet1!R16C4


There is also xlsRead$() returning the content of the selection:
        xlsWrite "Masm32 is great"
        PrintLine "Content R2C1", Tb$, "[", xlsRead$("R2C1"), "]"        ; get content of RnCn
        PrintLine "Current sel ", Tb$, "[", xlsRead$(), "]"        ; get content current selection

Output:
Content R2C1    []
Current sel     [Masm32 is great]


I hope I understood your question correctly...?

P.S.: Even this works (i.e. select a table, print the first two columns):
  StringToArray xlsRead$(), rc$(), tab        ; get a two-dimensional string array
  For_ ecx=0 To eax-1
        Print Str$("Row %i\t: C1=", ecx), rc$(ecx, 0)
        Print Tb$, "C2=", rc$(ecx, 1), CrLf$
  Next

TWell

I mean something like this:

  xlsCommand "[new(1)]"                 ; create a new workbook (works fine on non-English Excel versions!)
  Let esi=xlsSysRead$("Selection")         ; we must find the sheet

then you may get "[Book20]Sheet1!R1C1"
now split that string at '!'
now you have sheet name "[Book20]Sheet1"
and row/col format "R1C1" in Excel's native format in that language version
it can be like "R1S1" in another Excel language / version
now pick those letters for latter usage.



jj2007

Quote from: TWell on October 03, 2013, 11:48:54 PM
it can be like "R1S1" in another Excel language / version
now pick those letters for latter usage.

Interesting idea, thanks :t

So how does R2C2 look in Russian? с2с2? ::)

The Excel sheet has 20 rows and five columns.
La hoja de Excel tiene 20 filas y cinco columnas.
La feuille Excel dispose de 20 lignes et cinq colonnes.
Il foglio Excel dispone di 20 righe e cinque colonne.
Das Excel-Blatt hat 20 Zeilen und fünf Spalten.
Лист Excel имеет 20 строки и пять столбцов.