You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@poi.apache.org by tom corcoran <os...@gmail.com> on 2008/10/22 15:57:50 UTC

Outputting sheet name in XLS2CSVmra

Previously I've discussed XLS2CSVmra on this list, ref
https://issues.apache.org/bugzilla/show_bug.cgi?id=45365

I see from the 3,2 release notes that there was an addition to Include the
sheet name in the output of examples.XLS2CSVmra(POI-DEVELOPERS)

In my custom XLS2CSVmra I was dfoing this. Wanting to keep our code current,
I'd like to incorporrate the 3.2 changes. In my version I had to
processRecord:
  if (outputSheetNameNow) {
   output.printf("SheetName%d=%s\n",sheetNumber,sheetName.get(sheetNumber).toString());
   outputSheetNameNow = false;
  }
>From a brief comparison check with the new code I am not sure where and if
the sheetname gets outputed? Ideally I can eliminate my custom version....

Thanks, Tom.

Re: Outputting sheet name in XLS2CSVmra

Posted by tom corcoran <os...@gmail.com>.
Thanks Nick!

On Wed, Nov 12, 2008 at 3:26 PM, Nick Burch <ni...@torchbox.com> wrote:

> On Wed, 22 Oct 2008, tom corcoran wrote:
>
>> Would you consider perhaps an output which showed the sheet number, eg,
>> [1]Sheet1: ?
>>
>
> svn now has
>        <sheet name> [<sheet number>]:
> eg
>        Sheet1 [1]:
>
> Nick
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: user-unsubscribe@poi.apache.org
> For additional commands, e-mail: user-help@poi.apache.org
>
>

Re: Outputting sheet name in XLS2CSVmra

Posted by Nick Burch <ni...@torchbox.com>.
On Wed, 22 Oct 2008, tom corcoran wrote:
> Would you consider perhaps an output which showed the sheet number, eg,
> [1]Sheet1: ?

svn now has
 	<sheet name> [<sheet number>]:
eg
 	Sheet1 [1]:

Nick

---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@poi.apache.org
For additional commands, e-mail: user-help@poi.apache.org


Re: Outputting sheet name in XLS2CSVmra

Posted by tom corcoran <os...@gmail.com>.
Ok, I see in processRecord:
output.println(orderedBSRs[sheetIndex].getSheetname() + ":");

So looks like difference in output will be
      My hacked verison: SheetName1=Sheet1{ new line}
      3.2 final version: Sheet1:

My regular expressions that parse the output need the sheetnumber in it...so
looks like I will need to continue to have a hacked version with just this
line changed....

Would you consider perhaps an output which showed the sheet number, eg,
[1]Sheet1: ?

I could change my regex to look for that and eliminate my hacked version!

Thanks for considering!

Tom.

On Wed, Oct 22, 2008 at 2:57 PM, tom corcoran <os...@gmail.com> wrote:

> Previously I've discussed XLS2CSVmra on this list, ref
> https://issues.apache.org/bugzilla/show_bug.cgi?id=45365
>
> I see from the 3,2 release notes that there was an addition to Include the
> sheet name in the output of examples.XLS2CSVmra(POI-DEVELOPERS)
>
> In my custom XLS2CSVmra I was dfoing this. Wanting to keep our code
> current, I'd like to incorporrate the 3.2 changes. In my version I had to
> processRecord:
>   if (outputSheetNameNow) {
>
>    output.printf("SheetName%d=%s\n",sheetNumber,sheetName.get(sheetNumber).toString());
>    outputSheetNameNow = false;
>   }
> From a brief comparison check with the new code I am not sure where and if
> the sheetname gets outputed? Ideally I can eliminate my custom version....
>
> Thanks, Tom.
>