Author Topic: Copy 500 element array to Excel?  (Read 8650 times)

Archie

  • Administrator
  • Hero Member
  • *****
  • Posts: 5322
    • View Profile
    • AdvancedHMI
Re: Copy 500 element array to Excel?
« Reply #30 on: October 03, 2017, 08:00:41 AM »
Where are you storing the file? Windows 10 may be more restrictive about writing to certain directories. If you are writing to the same directory as the executable by using ".\MyFile.xlsx", then it should work fine.

bob1371

  • Newbie
  • *
  • Posts: 35
    • View Profile
Re: Copy 500 element array to Excel?
« Reply #31 on: October 04, 2017, 02:08:13 AM »
I'm running the application off USB drive but storing file to C:\Data.
Changed it to write file to USB drive and working fine.

Thanks.
« Last Edit: October 04, 2017, 02:30:35 AM by bob1371 »

Birdsill

  • Newbie
  • *
  • Posts: 3
    • View Profile
Re: Copy 500 element array to Excel?
« Reply #32 on: October 31, 2017, 08:34:15 AM »
Hi Bob
I was wondering if you dabbled with the cell formatting yet? More towards converting the data type from text to number. 

bob1371

  • Newbie
  • *
  • Posts: 35
    • View Profile
Re: Copy 500 element array to Excel?
« Reply #33 on: November 01, 2017, 12:36:46 AM »

I just had it Autosize the width to fit the headers. As for converting to a number, the team that will be gathering this data for trending will just multiply by 1 when they do the import.


You might look at this and it may lead you in right direction.

worksheet.cells["C2:C5"].style.Numberformat.format = "#,###"
« Last Edit: November 01, 2017, 12:42:51 AM by bob1371 »

Birdsill

  • Newbie
  • *
  • Posts: 3
    • View Profile
Re: Copy 500 element array to Excel?
« Reply #34 on: November 01, 2017, 07:25:46 AM »
Thanks!