From: Jason Lillywhite Date: 2009-05-13T00:19:51+09:00 Subject: Re: Export to Excel from SciTE Result Log Rase In wrote: > Thanks a lot Jason, i got it; > now i am able to read the Text Box, List box contents and store it in > Excel sheet. thanks for your support; no problem. I'm happy you got it to work! > > i have a one more query,how can take the Labels and store it in Excel > sheet?? If they are not changing, I would just append those statically to your csv file by doing: row << "Name, Age, Favorite Color\n" before you do your block iteration on the element array. If they are changing, you need to dynamically refer to those labels. I encourage you to experiment with IRB using methods on arrays and hashes to return the keys of your hashes. Once you are able to do that, you just simply append those values to your file using the << operator. > > Eg: my Website has 10 pages, each page 5 t0 10 labels..how can i get > those and store in different worksheets I am not a good source for Rails questions. You may want to re-post this to a Rails forum, but I know that if you need multiple worksheets in a single xls file, you will need to do some post processing of results. Maybe you could create one csv file for each webpage. Then have Excel read multiple csv files into multiple worksheets. When Excel saves in csv format, it will only save the left most sheet. Therefore, you need a different Excel file to grab all that data. Try this: If you use Data -> Import External Data and point to the csv file as the external data source, then you will have a data range that can be refreshed at any time. You may want to consult Excel wizards, but that is how I would do it. -- Posted via http://www.ruby-forum.com/.