Title: Re: [jXLS-user] Importing Excel With JXLS: is it possible to specify sheet by order rather than name?
Hi,

As a workaround you can read the workbook using POI API and find out the sheet name.
Then you can update XML config in memory with a proper sheet name and supply it to ReaderBuilder or build the config without XML but with API calls.

I think the feature to read the sheet by its ordering number can be implemented for the next release.

--
Best regards,
Leonid


Friday, December 14, 2012, 3:08:47 AM, you wrote:


Hi,
My users have been changing the name of the sheet, which makes JXLS miss it.
Is there a way to tell JXLS to just read the first sheet and only the first sheet no matter what its name is? I couldn't find anything on Google, but if you can please feel free to post a link
Thanks much

My config file:
<?xml version="1.0" encoding="ISO-8859-1"?> <workbook>
  <worksheet name="staff_acme">
    <loop startRow="1" endRow="1" items="VECIDataHolder" var="vdh" varType="gov.noaa.nsd.model.data.dataholders.VECIDataHolder">
      <section startRow="1" endRow="1">
        <mapping row="1" col="0">vdh.person_id</mapping>
        <mapping row="1" col="1">vdh.fullname</mapping>
        <mapping row="1" col="2">vdh.noaa_email_address</mapping>
        <mapping row="1" col="3">vdh.emergency_email_address</mapping>
        <mapping row="1" col="4">vdh.emergency_cell</mapping>
        <mapping row="1" col="5">vdh.emergency_sms</mapping>
      </section>
      <loopbreakcondition>
        <rowcheck offset="0">
          <cellcheck offset="0"/>
        </rowcheck>
      </loopbreakcondition>
    </loop>
  </worksheet> </workbook>



------------------------------------------------------------------------------
LogMeIn Rescue: Anywhere, Anytime Remote support for IT. Free Trial
Remotely access PCs and mobile devices and provide instant support
Improve your efficiency, and focus on delivering more value-add services
Discover what IT Professionals Know. Rescue delivers
http://p.sf.net/sfu/logmein_12329d2d
_______________________________________________
jXLS-user mailing list
jXLS-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/jxls-user

Reply via email to