[jawsscripts] Re: How to export data to excel

  • From: Chad Foster <chad.foster@xxxxxxxxxx>
  • To: jawsscripts@xxxxxxxxxxxxx
  • Date: Sat, 13 Mar 2010 08:53:11 -0500

I think that first you would have to create a new workbook. Then set
the focus to a worksheet within that workbook - your above code does
not do this step.

Then, set an objecdt pointer to the cell in question - such as:


let oCell = oWorkbook.Sheets("SheetName").Cells(iRowNumber,iColumnNumber)

Then write to the value with a statement such as:

let oCell.Value = "MyValue"

That should do the trick - the above code is written from memory in an
email message, so it's not compiled, not verified, but it should get
you headed in the right direction. With that in place, you could begin
writing your While loops to write the table headers and text cells.


HTH,



On 3/13/10, Jacob Kruger <jacobk@xxxxxxxxxxxxxx> wrote:
> Really don't know too much about specifically writing to excel fields etc.,
> but if it was just information you wanted to review as such, wouldn't it
> maybe be easier to just generate comma separated values and write these to a
> text file that was then named .csv, which would generally anycase be opened
> in excel as such?
>
> Stay well
>
> Jacob Kruger
> Blind Biker
> Skype: BlindZA
> '...fate had broken his body, but not his spirit...'
>
> ----- Original Message -----
> From: "Saurabh Malav" <saurabhmalav@xxxxxxxxx>
> To: <jawsscripts@xxxxxxxxxxxxx>
> Sent: Saturday, March 13, 2010 1:32 PM
> Subject: [jawsscripts] How to export data to excel
>
>
>> Hi Friends,
>> Currently I am writing jaws script for one java based application in which
>>
>> I
>> found that the navigation within the table is very slow through keyboard.
>> So
>> I thought to export content of this table to excel so that it can be
>> navigated with fast speed.
>>
>> I wrote some scripts by using Excel Object Model through which I am able
>> to
>> get object of excel sheet and set keyboard focus to any desired cell, but
>> I
>> am unable to write any data to any cell. Following is the my code to
>> perform
>> this operation.
>>
>> Var Object oExcel, Object oNull
>> Let oExcel = GetObject("Excel.Application")
>> oExcel.Range("b1").Select()
>> oExcel.Range("b1").Value("My data")
>>
>> Let oExcel = oNull
>>
>> In this script I am trying to type a string in "b1" cell but unable to do
>> this although I am able to set focus to this cell by using above code.
>> Can anybody give any solution on how to type any string to excel sheet?
>>
>> Thanks in advance,
>> Saurabh
>>
>>
>> __________
>> Visit and contribute to The JAWS Script Repository http://jawsscripts.com
>>
>> View the list's information and change your settings at
>> //www.freelists.org/list/jawsscripts
>>
>>
>> __________ Information from ESET NOD32 Antivirus, version of virus
>> signature database 4940 (20100312) __________
>>
>> The message was checked by ESET NOD32 Antivirus.
>>
>> http://www.eset.com
>>
>>
>>
>
>
> __________ Information from ESET NOD32 Antivirus, version of virus signature
> database 4940 (20100312) __________
>
> The message was checked by ESET NOD32 Antivirus.
>
> http://www.eset.com
>
>
>
> __________
> Visit and contribute to The JAWS Script Repository http://jawsscripts.com
>
> View the list's information and change your settings at
> //www.freelists.org/list/jawsscripts
>
>


-- 
Chad Foster
Access Technology Solutions
Leveling The Playing Field Through Technology
http://www.GO-ATS.net
__________ 
Visit and contribute to The JAWS Script Repository http://jawsscripts.com

View the list's information and change your settings at 
//www.freelists.org/list/jawsscripts

Other related posts: