Hey Wesley! Since you're not getting an error that says there is no method 'range' for a nil value, it doesn't seem your problem is data related. Have you tried re-installing the Win32ole gem? (just a guess....)
-Tiffany On Dec 5, 1:17 am, Wesley Chen <[email protected]> wrote: > Thanks, Ethan, > I have searched a lot in google. > I just want to ask anybody who has met this kind of problem. > I think in the group, there are many experts who are good at excel class. > > Thanks. > Wesley Chen. > For life, the easier, the better. > > On Sat, Dec 5, 2009 at 3:36 PM, Ethan <[email protected]> wrote: > > Does this have anything to do with Watir? > > > @worksheet seems to be a win32ole corresponding to something in excel, > > which isn't what watir deals with. it's not very clear from the code snippet > > (and screenshots of code are not a good way to convey information - just > > copy and paste) what this is, but it doesn't appear to be using watir. > > > If this same script was working before, my only advice is the usual stuff > > to try of rebooting, reverting any changes to the system that have been > > made, and googling the error code to see if any results look informative. > >http://www.google.com/search?q=800a01a8 > > > On Sat, Dec 5, 2009 at 02:13, Wesley Chen <[email protected]> wrote: > > >> The report always runs OK before, but today, it displays unexpected error > >> message as below: > > >> *E:/NetbeansProjects/qa-test-scripts/Coach > >> tool/training/Workout/../../../lib/reporting.rb:178:in `method_missing': > >> range (WIN32OLERuntimeError) > >> OLE error code:0 in <Unknown> > >> <No Description> > >> HRESULT error code:0x800a01a8* > > >> The method is as below: > >> *def pages_visited() > >> url_cleanup() > >> i = 0 > >> @worksheet.range("d"+ (10+total_tests()).to_s)['Value'] = ["Pages > >> Visited"] > >> @worksheet.range("d"+ (10+total_tests()).to_s).HorizontalAlignment > >> = WIN32OLE::XlCenter > >> @worksheet.range("d"+ > >> (10+total_tests()).to_s).Interior['ColorIndex'] = 11 > >> @worksheet.range("d"+ (10+total_tests()).to_s).Font['ColorIndex'] > >> = 2 > >> @worksheet.range("d"+ (10+total_tests()).to_s).Font.Bold = true > >> @urls.each do |page| > >> @worksheet.range("d"+ (i+11+total_tests()).to_s).Value = > >> [page] > >> i += 1 > >> end > >> end* > > >> Please see the two pictures attached for details. > >> code.png means the code; > >> ouput.png means the output result. The output result is as expected. > > >> Thanks. > >> Wesley Chen. > >> For life, the easier, the better. > > >> -- > >> You received this message because you are subscribed to the Google Groups > >> "Watir General" group. > >> To post to this group, send email to [email protected] > >> Before posting, please read the following guidelines: > >>http://wiki.openqa.org/display/WTR/Support > >> To unsubscribe from this group, send email to > >> [email protected] > >> For more options, visit this group at > >>http://groups.google.com/group/watir-general > > > -- > > You received this message because you are subscribed to the Google Groups > > "Watir General" group. > > To post to this group, send email to [email protected] > > Before posting, please read the following guidelines: > >http://wiki.openqa.org/display/WTR/Support > > To unsubscribe from this group, send email to > > [email protected] > > For more options, visit this group at > >http://groups.google.com/group/watir-general -- You received this message because you are subscribed to the Google Groups "Watir General" group. To post to this group, send email to [email protected] Before posting, please read the following guidelines: http://wiki.openqa.org/display/WTR/Support To unsubscribe from this group, send email to [email protected] For more options, visit this group at http://groups.google.com/group/watir-general
