Closed (fixed)
Project:
Sheetnode
Version:
7.x-1.0-beta1
Component:
PHPExcel integration
Priority:
Normal
Category:
Support request
Assigned:
Unassigned
Reporter:
Created:
23 Apr 2012 at 21:49 UTC
Updated:
10 May 2012 at 21:55 UTC
Jump to comment: Most recent file
Comments
Comment #1
infojunkieNot sure either what might be wrong, so we'll need to debug:
In the file sheetnode/modules/sheetnode_phpexcel/sheetnode_phpexcel.export.inc, please add the following lines after line 74 (which should read
$plugin = $plugins[$results['format']];in function_sheetnode_phpexcel_batch_export_finished:Also, comment out the lines that read:
and
Finally, enable Devel module.
What's the debugging output that gets printed? You might need to click it to expand the text.
Thanks for your help!
Comment #2
HelloStephanie commentedThank you so much for your quick reply. I went ahead and followed your steps for debugging...
First, I get this message from Drupal in the system messages box:
Notice: Undefined index: in _sheetnode_phpexcel_batch_export_finished() (line 74 of xxx/sites/all/modules/sheetnode/modules/sheetnode_phpexcel/sheetnode_phpexcel.export.inc).
Notice: Undefined index: in _sheetnode_phpexcel_batch_export_finished() (line 74 of xxx/sites/all/modules/sheetnode/modules/sheetnode_phpexcel/sheetnode_phpexcel.export.inc).
I attached 2 screenshots of the messages Devel output on the screen. Devel_output2.jpg had a ton of output code when you expand "workbook" -- so I've gone ahead and attached that as well, in case it's useful to look at.
Comment #3
infojunkieThe error occurs because the
$formatvariable is empty while it should hold the desired format you chose (e.g. `xls`, `xlsx`, etc.)* What is the link that you click to export? Please paste its URL here.
* On line 22 of sheetnode/modules/sheetnode_phpexcel/sheetnode_phpexcel.export.inc, before the line that reads
sheetnode_phpexcel_batch_export($sheets, $node->title, $format);, please add:Also remove the other
dsmcalls you had added previously to avoid cluttering the output. What debugging output do you see now?Comment #4
HelloStephanie commentedHmm... not sure if I did this right. Should I have un-commented the things you told me to comment out?
This time I ran it form the url http://www.foo.com/excel/spreadsheet (the URL I created using feed setting for path in views) and it went through with no error from Devel. It did have this error output from Drupal:
Notice: Undefined index: in _sheetnode_phpexcel_export_download() (line 121 of xxx/sites/all/modules/sheetnode/modules/sheetnode_phpexcel/sheetnode_phpexcel.export.inc).
Notice: Undefined index: in _sheetnode_phpexcel_batch_export_finished() (line 75 of xxx/sites/all/modules/sheetnode/modules/sheetnode_phpexcel/sheetnode_phpexcel.export.inc).
The file that downloaded appears to be an HTML doc of SQL (I've attached it). I had to re-save it as a .pdf to attach here, but it downloaded as a .html file.
Comment #5
infojunkieI think I understand now: you're trying to export a view, not a node! Can you confirm this?
If so, in the feed's style options, did you select a file format in the "Export as" setting?
Comment #6
HelloStephanie commentedHi -- sorry for the slow reply. Yes, I see the "Export as" Setting -- I'm not sure how I completely missed this!
I'll let you know if I have anymore troubles.
Comment #7
infojunkieClosing this as a support request for now.
Comment #8
HelloStephanie commentedOk. Now I'm having a different problem where every file I try to download (xls, xlsx, or pdf) downloads as a blank file despite the fact that there is content in the main page which it is attached to...
Comment #9
infojunkieCan you please download the latest dev and try again?
Also, let's treat this as a support request until we find a critical bug.
Comment #10
HelloStephanie commented-beta2 fixed all my problems.
Works great! Thank you so much, this module rocks (once I figured out how to enable it properly *facepalm*)
I missed the xls button the first time b/c when I clicked on Format --> Settings under feeds, the window jumped down to the section where you put in a template. Might just be my install though...
Comment #11
infojunkieNo, the scrolling is a bug. I logged it to remember: #1571336: Page scrolls to spreadsheet upon loading. Thanks!