You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@poi.apache.org by bu...@apache.org on 2009/01/16 03:24:16 UTC
DO NOT REPLY [Bug 46544] New: Add main() method to
org.apache.poi.hssf.extractor.ExcelExtractor
https://issues.apache.org/bugzilla/show_bug.cgi?id=46544
Summary: Add main() method to
org.apache.poi.hssf.extractor.ExcelExtractor
Product: POI
Version: 3.5-dev
Platform: PC
OS/Version: Windows XP
Status: NEW
Severity: enhancement
Priority: P2
Component: HSSF
AssignedTo: dev@poi.apache.org
ReportedBy: georger_br@yahoo.com.br
Hello,
Please add a main() method to org.apache.poi.hssf.extractor.ExcelExtractor so
that it is possible to extract text from a .XLS file from the command line -
like in org.apache.poi.hwpf.extractor.WordExtractor.
Regards,
Georger
--
Configure bugmail: https://issues.apache.org/bugzilla/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug.
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@poi.apache.org
For additional commands, e-mail: dev-help@poi.apache.org
DO NOT REPLY [Bug 46544] [PATCH] Add main() method to
org.apache.poi.hssf.extractor.ExcelExtractor
Posted by bu...@apache.org.
https://issues.apache.org/bugzilla/show_bug.cgi?id=46544
Josh Micich <jo...@gildedtree.com> changed:
What |Removed |Added
----------------------------------------------------------------------------
Status|REOPENED |RESOLVED
Resolution| |FIXED
--- Comment #5 from Josh Micich <jo...@gildedtree.com> 2009-01-23 15:08:23 PST ---
(In reply to comment #4)
> Created an attachment (id=23170)
--> (https://issues.apache.org/bugzilla/attachment.cgi?id=23170) [details]
> Patch that fixes filename parsing in r737173 ( https://svn.apache.org/viewcvs.cgi?view=rev&rev=737173 )
I think it will work with this single line fix (svn r737238 ( https://svn.apache.org/viewcvs.cgi?view=rev&rev=737238 )). Please try it
out.
--
Configure bugmail: https://issues.apache.org/bugzilla/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug.
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@poi.apache.org
For additional commands, e-mail: dev-help@poi.apache.org
DO NOT REPLY [Bug 46544] [PATCH] Add main() method to
org.apache.poi.hssf.extractor.ExcelExtractor
Posted by bu...@apache.org.
https://issues.apache.org/bugzilla/show_bug.cgi?id=46544
Georger Araujo <ge...@yahoo.com.br> changed:
What |Removed |Added
----------------------------------------------------------------------------
Attachment #23163|0 |1
is obsolete| |
--- Comment #4 from Georger Araujo <ge...@yahoo.com.br> 2009-01-23 14:59:13 PST ---
Created an attachment (id=23170)
--> (https://issues.apache.org/bugzilla/attachment.cgi?id=23170)
Patch that fixes filename parsing in r737173 ( https://svn.apache.org/viewcvs.cgi?view=rev&rev=737173 )
This patch fixes r737173 ( https://svn.apache.org/viewcvs.cgi?view=rev&rev=737173 )into actually working. I tested it with several
correct and incorrect command lines (existing file, non-existent file,
directory, parameters taking values other than 'Y' or 'N', missing parameters)
and all looks well.
--
Configure bugmail: https://issues.apache.org/bugzilla/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug.
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@poi.apache.org
For additional commands, e-mail: dev-help@poi.apache.org
DO NOT REPLY [Bug 46544] [PATCH] Add main() method to
org.apache.poi.hssf.extractor.ExcelExtractor
Posted by bu...@apache.org.
https://issues.apache.org/bugzilla/show_bug.cgi?id=46544
Georger Araujo <ge...@yahoo.com.br> changed:
What |Removed |Added
----------------------------------------------------------------------------
Summary|Add main() method to |[PATCH] Add main() method to
|org.apache.poi.hssf.extracto|org.apache.poi.hssf.extracto
|r.ExcelExtractor |r.ExcelExtractor
--
Configure bugmail: https://issues.apache.org/bugzilla/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug.
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@poi.apache.org
For additional commands, e-mail: dev-help@poi.apache.org
DO NOT REPLY [Bug 46544] [PATCH] Add main() method to
org.apache.poi.hssf.extractor.ExcelExtractor
Posted by bu...@apache.org.
https://issues.apache.org/bugzilla/show_bug.cgi?id=46544
Georger Araujo <ge...@yahoo.com.br> changed:
What |Removed |Added
----------------------------------------------------------------------------
Status|RESOLVED |CLOSED
--- Comment #8 from Georger Araujo <ge...@yahoo.com.br> 2009-01-23 15:40:44 PST ---
Hi Josh,
That did the trick. Thanks!
I'll look into writing a unit test.
--
Configure bugmail: https://issues.apache.org/bugzilla/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug.
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@poi.apache.org
For additional commands, e-mail: dev-help@poi.apache.org
DO NOT REPLY [Bug 46544] [PATCH] Add main() method to
org.apache.poi.hssf.extractor.ExcelExtractor
Posted by bu...@apache.org.
https://issues.apache.org/bugzilla/show_bug.cgi?id=46544
Georger Araujo <ge...@yahoo.com.br> changed:
What |Removed |Added
----------------------------------------------------------------------------
Status|RESOLVED |REOPENED
Resolution|FIXED |
--- Comment #3 from Georger Araujo <ge...@yahoo.com.br> 2009-01-23 12:53:47 PST ---
Hi,
Unfortunately it did not work:
--begin--
[georger@phoenix excel]# java org.apache.poi.hssf.extractor.ExcelExtractor -i
test.xls
Specified input file '-i' does not exist
Use:
org.apache.poi.hssf.extractor.ExcelExtractor [<flag> <value> [<flag>
<value> [...]]] [-i <filename.xls>]
-i <filename.xls> specifies input file (default is to use stdin)
Flags can be set on or off by using the values 'Y' or 'N'.
Following are available flags and their default values:
--show-sheet-names Y
--evaluate-formulas Y
--show-comments N
--show-blanks Y
--end--
--
Configure bugmail: https://issues.apache.org/bugzilla/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug.
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@poi.apache.org
For additional commands, e-mail: dev-help@poi.apache.org
DO NOT REPLY [Bug 46544] [PATCH] Add main() method to
org.apache.poi.hssf.extractor.ExcelExtractor
Posted by bu...@apache.org.
https://issues.apache.org/bugzilla/show_bug.cgi?id=46544
Josh Micich <jo...@gildedtree.com> changed:
What |Removed |Added
----------------------------------------------------------------------------
Status|REOPENED |RESOLVED
Resolution| |FIXED
--- Comment #7 from Josh Micich <jo...@gildedtree.com> 2009-01-23 15:36:29 PST ---
Fixed in svn 737248.
A unit test would be nice.
--
Configure bugmail: https://issues.apache.org/bugzilla/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug.
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@poi.apache.org
For additional commands, e-mail: dev-help@poi.apache.org
DO NOT REPLY [Bug 46544] Add main() method to
org.apache.poi.hssf.extractor.ExcelExtractor
Posted by bu...@apache.org.
https://issues.apache.org/bugzilla/show_bug.cgi?id=46544
--- Comment #1 from Georger Araujo <ge...@yahoo.com.br> 2009-01-22 16:19:52 PST ---
Created an attachment (id=23163)
--> (https://issues.apache.org/bugzilla/attachment.cgi?id=23163)
Patch to add main() method to java org.apache.poi.hssf.extractor.ExcelExtractor
Tested successfully against SVN 20090122 (revision 736505 ( https://svn.apache.org/viewcvs.cgi?view=rev&rev=736505 )).
--
Configure bugmail: https://issues.apache.org/bugzilla/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug.
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@poi.apache.org
For additional commands, e-mail: dev-help@poi.apache.org
DO NOT REPLY [Bug 46544] [PATCH] Add main() method to
org.apache.poi.hssf.extractor.ExcelExtractor
Posted by bu...@apache.org.
https://issues.apache.org/bugzilla/show_bug.cgi?id=46544
Georger Araujo <ge...@yahoo.com.br> changed:
What |Removed |Added
----------------------------------------------------------------------------
Status|RESOLVED |REOPENED
Resolution|FIXED |
--- Comment #6 from Georger Araujo <ge...@yahoo.com.br> 2009-01-23 15:30:16 PST ---
Hi Josh,
I applied your patch and ran into the same issue I got when I first worked on
my second patch. This is what happens when I run the command without a
filename:
--begin--
[georger@phoenix excel]# java org.apache.poi.hssf.extractor.ExcelExtractor -i
Exception in thread "main" java.lang.ArrayIndexOutOfBoundsException: 1
at
org.apache.poi.hssf.extractor.ExcelExtractor$CommandArgs.<init>(ExcelExtractor.java:92)
at
org.apache.poi.hssf.extractor.ExcelExtractor.main(ExcelExtractor.java:186)
--end--
After I got this error in my own code, I made it more careful.
--
Configure bugmail: https://issues.apache.org/bugzilla/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug.
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@poi.apache.org
For additional commands, e-mail: dev-help@poi.apache.org
DO NOT REPLY [Bug 46544] [PATCH] Add main() method to
org.apache.poi.hssf.extractor.ExcelExtractor
Posted by bu...@apache.org.
https://issues.apache.org/bugzilla/show_bug.cgi?id=46544
Josh Micich <jo...@gildedtree.com> changed:
What |Removed |Added
----------------------------------------------------------------------------
Status|NEW |RESOLVED
Resolution| |FIXED
--- Comment #2 from Josh Micich <jo...@gildedtree.com> 2009-01-23 12:24:40 PST ---
Applied in svn r737173 ( https://svn.apache.org/viewcvs.cgi?view=rev&rev=737173 )
I made the new command line interface capable of using stdin (when no input
file is provided) and also able to set the four flags (includeSheetNames etc).
Note that you must use "-i" before the file name when supplying it on the
command line (your original patch allowed a file name with no prior argument).
Please take a look at the latest version of ExcelExtractor and make sure it
does what you need, since there is no junit to exercise the new code.
--
Configure bugmail: https://issues.apache.org/bugzilla/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug.
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@poi.apache.org
For additional commands, e-mail: dev-help@poi.apache.org