Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Excel help needed
#1
Hi Gintaras, hi all,

as many, i must declare my income tax, and i do it partially via an excel document.

Situation:

One excel file, containing 12 tabs labeled from january to december.

Rows are free as they will contain the purpose of the income/expense, the amount of it.

Colums are already filled with categories: food, gas, train ticket, professional taxes and so on......

My goal:

say i want to declare i spent for professional travel a 200€ train ticket.
Category is colum H, amount will be in row 4 : so i want QM to put value 200 in cell H:4

i tried all day to achieve that with no luck, by trying to adapt some code in the help files.
(from doc)

str a3 b3
ExcelSheet es.Init
es.GetCell(a3 1 3)
es.GetCell(b3 2 3)
out a3
out b3

This one triggers an error (Error (RT) in Macro name: 0x80004002, Cette interface n’est pas prise en charge) which can be translated to
"this interface is not handled, can not be used ,even is not declared)

I use Office 2007 under Windows 7.

I think i could do better, but i can't find documentation for all the functions if i try to use excel
via the COM interface thing
(from doc)
Excel.Workbook x._getfile("$desktop$\Book5.xls")
Excel.Application a=x.Application
a.Visible=TRUE; err
Excel.Windows ws=a.Windows
Excel.Window w=ws.Item(1)
w.Visible=TRUE

the code works, but i can't go further as i don't understand what mean Workbook, Workbooks, ws and
so on. If you could steer me to the place where i can find the API definitions.....

Thanks in advance.

Laurent


Messages In This Thread

Forum Jump:


Users browsing this thread: 1 Guest(s)