1

I have already set it to be 4GB.

Needs["JLink`"]
ReinstallJava[JVMArguments -> "-Xmx4096m"]

However, when exporting a dataset to Excel sheet, I still get the following: enter image description here

Very frsutrating after a long wait and still getting this error. My laptop does have 32G of RAM. But is there a way to figure out how much to set in advance (instead of setting to the limit)?

Thanks.

Chen Stats Yu
  • 4,986
  • 2
  • 24
  • 50
  • Hard to say without ans. – Kuba Nov 03 '17 at 06:43
  • 1
    At the very least, what does ByteCount[Prepend[ans, Range[85]]] return? – J. M.'s missing motivation Nov 03 '17 at 06:55
  • @J.M. Wow, it's 519284064. No idea it's that big! – Chen Stats Yu Nov 03 '17 at 14:47
  • 2
    Then, can you try setting to 8 GB (ReinstallJava[JVMArguments -> "-Xmx8192m"])? – J. M.'s missing motivation Nov 03 '17 at 14:50
  • 1
    If you do not mind using NETLink (which seems way more efficient than JLink in the case of exporting large Excel files), try my bigExport function posted here: http://community.wolfram.com/groups/-/m/t/1163363 – Rolf Mertig Nov 03 '17 at 22:46
  • @RolfMertig Might be a good way. Don't know why Wolfram is not using it. I am exporting three sheets in the same xlsx file. I don't know how to modify the code accordingly. There is no problem just exporting a single sheet. Thanks. – Chen Stats Yu Nov 04 '17 at 01:45
  • @RolfMertig It also requires some tuning for unequal length data. I got the error ""Objects of unequal length in {0,0}+{5000} cannot be combined"", most of my data are. – Chen Stats Yu Nov 04 '17 at 01:47
  • You should pad your data to be a list of equal lengths (with "" or 0 or so). more Sheets you can do by looping (Do loop) over Item[j]. I.e., check out what sheet=book@Worksheets@Item[1]; is doing. Try it yourself. – Rolf Mertig Nov 04 '17 at 12:04

0 Answers0