Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Mike Lewis on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Search results for query: *

  1. stevesmith69

    Working with Excel ranges

    Me too now! Really pleased to get this working. Many thanks for all your help Dan. I would never in a million years of cracked this. Much appreciated. Steve. :-)
  2. stevesmith69

    Working with Excel ranges

    Yes, I too got a length of 4 for the array but still get null or not an object error when referencing the contents of the array.
  3. stevesmith69

    Working with Excel ranges

    I'm really sorry Dan, but I can't get that to work. jsRangeArray is still null or not an object. Perhaps I'm not using it correctly - could you throw up your code please?
  4. stevesmith69

    Working with Excel ranges

    Glad to give you the challenge. :-) Many thanks for all your help Dan.
  5. stevesmith69

    Working with Excel ranges

    I'll try.http://www.childcareaccount.co.uk/test.xls
  6. stevesmith69

    Working with Excel ranges

    The range is defined in Excel. Excel_file.ActiveSheet.Range('MyRange').Address; returns $A$1:$B$2 which is the range defined as 'MyRange' in Excel.
  7. stevesmith69

    Working with Excel ranges

    Be nice to be able to edit my posts too. If I could i would have taken out the id = 1; line in the code. :-) The excel sheet is simple - just four arbitrary values (1,2,3,4) in A1:B2 and a defined name (MyRange) for that range. Nothing else.
  8. stevesmith69

    Working with Excel ranges

    Ok Thanks. <script type="text/javascript"> var Worksheet; var Excel; Worksheet = "C:\\test.xls"; Excel = new ActiveXObject("Excel.Application"); Excel.Visible = false; var Excel_file = Excel.Workbooks.Open(Worksheet); id = 1; var blah =...
  9. stevesmith69

    Working with Excel ranges

    Thanks Dan. That code throws up a blank alert box.
  10. stevesmith69

    Working with Excel ranges

    The debugger (Microsoft Script Debugger) returns a blank line for blah after executing var blah = foo.ActiveSheet.Range('MyRangeName'); Trying alert(blah); returns [object] in the alert box so something is being assigned I assume.
  11. stevesmith69

    Working with Excel ranges

    Oh and I discovered that blah.length is undefined in var blah = foo.ActiveSheet.Range('MyRangeName'); for (var loop=0; loop<blah.length; loop++) { alert(blah[loop].Value); } when it comes to iterating through the loop. The code just falls through the loop without doing the alert. If I...
  12. stevesmith69

    Working with Excel ranges

    Thanks again Dan. That was exactly the approach I tried before posting in this forum - it failed for me with the debugger telling me on the alert line that blah[...].Value is null or not an object Now, I know that my test Excel sheet has a value in each of my tiny 2x2 testing range and can...
  13. stevesmith69

    Working with Excel ranges

    Thank you BillyRayPreachersSon. I appreciate that I can use .ActiveSheet.Range('MyRangeName') but not how I can get at the values contained in those cells? How would .ActiveSheet.Range('MyRangeName').Value know which value to return from the many values contained in a range?
  14. stevesmith69

    Working with Excel ranges

    Hello, I'm fairly new to Javascript and excel and have struggled with this for days now. No amount of Googling has revealed the answer to me. How do I access the values in a named range in Excel using Javascript? I can see how to access a single value in a known location e.g. var1 =...

Part and Inventory Search

Back
Top