XLS_WRITER issue when fetch size is 0

Hello,
I have a graph that I have built using the Java API.

It has a DB_EXECUTE component that reads data from two stored procedures, and has a REFORMAT component as its output port that re-orders columns and then writes in to the XLS_WRITER component.

But my problem is that when the DB_EXECUTE has zero rows in the result set, the Excel file somehow is not written correctly. I warns when I try to open it, as it says it is corrupt. When i do manage to open it, it does not have any headers. It is simply blank.

I have other writers as well (STRUCTURE_WRITER and XML_WRITER), but they do not seem to have a problem.

If I try to read it using an external program (through Apache POI), it throws an IOException with the message ‘Unable to read entire header; 0 bytes read; expected 32 bytes’. I am not sure what it means, I’m using Clover 2.9.X.

Is there something I’ve missed?
Please let me know if you need more info.

Thanks,
Pramod

Hi Pramod,

I need to see the graph code to check the components configuration and to reproduce the issue. Thanks.

Hello Pramod,
unfortunately the xls file is invalid, when the XLSWriter component gets no data. I’ve created an issue in our bug tracking system (http://bug.cloveretl.org/view.php?id=5567) for the problem. The only workaround I’ve found is to create an empty file, before the graph run.