I need documentation to use HDF with POI??

On the site of POI, there's no explanation on hdf!
If someone can give me some doc to start my appli, it would be nice.
(I try to read a MS Word document)!
thanks

Did it two days ago. No shizerat.
You'll need to download the hdf code from
the "scratch section" of the poi site- which is how I got it to work.
import java.io.*;
import org.apache.poi.hpsf.*;
import org.apache.poi.poifs.eventfilesystem.*;
public class PoiTest {
public static void main(String[] args)
throws IOException
final String filename = args[0];
POIFSReader r = new POIFSReader();
r.registerListener(new MyPOIFSReaderListener(),
"\005SummaryInformation");
r.read(new FileInputStream(filename));
// create temp file of content
String curDir=System.getProperty("user.dir");
String pathSep=System.getProperty("file.separator");
String tempF=curDir+pathSep+"temp.txt";
testDoc td=new testDoc(filename, tempF);
td.getText();
} // end of class PoiTest
-----------Shizzy code, I know - but it worked for me----
----this is my docTest class I wrote to make it easy--
to get word into a text file---------------------------------------
import org.apache.poi.hdf.extractor.util.*;
import org.apache.poi.hdf.extractor.data.*;
import org.apache.poi.hdf.extractor.*;
import java.util.*;
import java.io.*;
import javax.swing.*;
import java.awt.*;
import org.apache.poi.poifs.filesystem.POIFSFileSystem;
import org.apache.poi.poifs.filesystem.POIFSDocument;
import org.apache.poi.poifs.filesystem.DocumentEntry;
import org.apache.poi.util.LittleEndian;
class testDoc {
String origFileName;
String tempFile;
WordDocument wd;
testDoc(String origFileName, String tempFile) {
this.tempFile=tempFile;
this.origFileName=origFileName;
public void getText() {
try {
wd = new WordDocument(origFileName);
Writer out = new BufferedWriter(new FileWriter(tempFile));
wd.writeAllText(out);
out.flush();
out.close();
catch (Exception eN) {
System.out.println("Error reading document:"+origFileName+"\n"+eN.toString());
} // end for getText
} // end of class

Similar Messages

  • Need Info about using Strut with WL 7.0

    I want to find out how to use it with WL 7.0. Would anyone give me any info about it? :) Thanks
              

    You could download and deploy "struts-example.war" from apache website.
              [That Struts 1.0.2 I think.]
              ---Nam
              Jordy wrote:
              > I want to find out how to use it with WL 7.0. Would anyone give me any info about it? :) Thanks
              And God said
              Let there be numbers
              And there were numbers.
              Odd and even created he them,
              He said to them be fruitful and multiply,
              And he commanded them to keep the laws of induction.
              [Bill Taylor [email protected]]
              [nam_nguyen.vcf]
              

  • Do we actually need Webcenter to use CMIS with ECM 11g ?

    Does anyone know if it is possible to work with the CMIS standard without using Webcenter; So only using ECM 11g and WLS ?

    I don't think that's possible...
    If i am correct the CMIS uses JSR168 portlets and therefore you need webcenter...
    You can have integration within a normal ADF application without needing a webcenter license and that's by using the RIDC API. This way you can easily integrate content from UCM to your custom applications.

  • Need help on using Tuxedo with Oracle 8

    Hi friends,
    I wrote a simple tuxedo server with embedded sql that has only the task to insert
    a string passed by the client into a table in oracle DB.
    The Server is logged on to the database correctly during tmboot. When I start the
    client the service function will be invoked and it returns TPSUCCESS. But somehow
    my sql statements are ignored. No record is added to the table and I got no sql errors.
    Here is my service function (AUTOTRAN=Y):
    void INSERT(TPSVCINFO *msg){
    EXEC SQL insert into ABC values ('some data');
    EXEC SQL COMMIT WORK;
    if (SQLCODE != SQL_OK){
    tpreturn(TPFAIL, 0, msg->data, 0L, 0);
    tpreturn(TPSUCCESS, 0, msg->data, 0L, 0);
    Thanks in advance.
    Kevin

    Thanks for your help.
    Kevin
    "Manoj SASIDHARAN" <[email protected]> wrote:
    >
    Hi Kevin,
    Oracle Docs has the following to say abt SQL Error -36:
    ORA-00036 maximum number of recursive SQL levels (string)
    exceeded
    Cause: An attempt was made to go more than the specified
    number
    of recursive SQL levels.
    Action: Remove the recursive SQL, possibly a recursive
    trigger.
    Pl check if u have some triggers on the table... and also
    determine
    the level of their nesting... That shld probably solve
    ur probs.
    Good Luck
    MS
    "Kevin" <[email protected]> wrote:
    Hi, thanks for your answer.
    But I am not sure of the error message...is the error
    code what
    I got an ORA error code or something else (e.g. why -36
    and not
    36)?
    Please have a look to my source code.
    Hope you can give me more information.
    Thanks in advance
    Kevin
    #include <stdio.h> /*operation system*/
    #include <Uunix.h> /*Tuxedo*/
    #include <errno.h> /*operation system*/
    #include <atmi.h> /*TPSVCINFO, TPFAIL, TPSUCCESS,
    etc.*/
    #include <sqlcode.h> /*SQL related*/
    #include <sqlca.h>
    void
    #if defined(__STDC__) || defined(__cplusplus)
    MSK2MANTA(TPSVCINFO *msg)
    #else
    MSK2MANTA(msg)
    TPSVCINFO *msg;
    #endif
    printf("MSK2MANTA Service started\n");
    if(msg->data == NULL){
    printf("received message is NULL!\n");
    tpreturn(TPFAIL, 0, msg->data, 0L, 0);
    printf("Transaction-Status = %d\n", tpgetlev());
    EXEC SQL insert into BUF values ('sysdate', 'msk2manta
    data');
    if ((sqlca.sqlcode != 0) || (SQLCODE != SQL_OK)){
    printf("Failed to insert! SQLCODE1 = %d\n", SQLCODE);
    printf("Failed to insert! sqlca.sqlcode = %d\n",sqlca.sqlcode);
    printf("Failed to insert! sqlca.sqlerrm.sqlerrmc=
    %s\n", sqlca.sqlerrm.sqlerrmc);
    tpreturn(TPFAIL, 0, msg->data, 0L, 0);
    EXEC SQL COMMIT WORK;
    if (SQLCODE != SQL_OK){
    printf("Failed to commit! SQLCODE2 = %d\n", SQLCODE);
    tpreturn(TPFAIL, 0, msg->data, 0L, 0);
    tpreturn(TPSUCCESS, 0, msg->data, 0L, 0);
    Output: tpgetlev()=1, SQLCODE=-36, sqlca.sqlcode=0, sqlerrmc=""
    Scott Holland <[email protected]> wrote:
    Also... print out the remainder of the sqlca structure.
    You will have
    error text in that structure describing what the actual
    error is.
    sdh
    Kevin wrote:
    Hi Manoj,
    thanks for your answer.
    I added an extra SQLCODE check after the insert andget following
    error:
    "SQLCODE = -36"
    Do you know how to find out what the error is stangfor?
    Thanks
    Kevin
    "Manoj SASIDHARAN" <[email protected]>
    wrote:
    Hi Kevin,
    Could u pl put an extra SQLCODE (or sqlca.sqlcode)check
    after the INSERT statement
    as shown in the modified code and try...
    Currently the check verifies the sqlcode of the COMMIT
    statement and not the INSERT
    statement executed just before.
    HTH
    Regards
    /MS
    "Kevin" <[email protected]> wrote:
    Hi friends,
    I wrote a simple tuxedo server with embedded sql
    that
    has only the task
    to insert
    a string passed by the client into a table in oracleDB.
    The Server is logged on to the database correctly
    during
    tmboot. When I
    start the
    client the service function will be invoked and
    it
    returns
    TPSUCCESS. But
    somehow
    my sql statements are ignored. No record is added
    to
    the table and I got
    no sql errors.
    Here is my service function (AUTOTRAN=Y):
    void INSERT(TPSVCINFO *msg){
    EXEC SQL insert into ABC values ('some data');
    //// MS CHANGES - START
    printf("SQLCODE = %ld", sqlca.sqlcode);
    if (sqlca.sqlcode != 0) {
    ////// Handle the case
    //// MS CHANGES - STOP
    EXEC SQL COMMIT WORK;
    if (SQLCODE != SQL_OK){
    tpreturn(TPFAIL, 0, msg->data, 0L, 0);
    tpreturn(TPSUCCESS, 0, msg->data, 0L, 0);
    Thanks in advance.
    Kevin

  • Integration documentation for sap sd with fico and mm

    hi Sappers,
    I need Documentation for SAP SD with FICO and MM Module
    its very urgent.
    mail id : [email protected]

    <b>Some basic information :</b>
    FI-MM: The integration between FI-MM happens in T-code: <b>OBYC</b>
      1. When PO is created :
    No Entry -
      2. When GR is posted 
          Inventory Account dr (Transaction Key BSX in OBYC)
                To GRIR account (T.Key WRX in T-code OBYC)
      3. When Invoice is posted
          GRIR account Dr.
          Vendor account  Cr.
      4. Payment made to Vendor
          Vendor A/c Dr
                To Bank Clearing A/c Cr.
    Points to know : Movement Types, Assignment of Movement types to T-keys (T-code OMJJ), Value string (I also need some information on this) , OMWN and OMWB transactions. 
    There is a close integration b/w FI & MM, actually document flows from MM to FI in the following areas such as,
    <u> 1. Movement Types:</u>
    Used to enable the system to find the predefined posting rules determining how the accounts of financial accounting system are to be posted & to update the stock fields in the matrl master data.(Goods Receipt, Goods Issue, etc)
    <u> 2. Valuation Class:</u>
    Assignment of material to grp of gl account, used to determine the gl accounts that are updated as a result of goods movement.
    <u>3. Transaction/Event key:</u>
    Used to control the storage or filing of documents & assignment of documents.Used to differeniate b/w various transactions such as goods movement tht occur in inventory.
    <u> 4. Material Type:</u>
    Each material should assign mtrl type in mtrl master record used to update whether changes made in qty are updated in material master record & change in value also updated in stock account.
    <u><b> FI-SD Integration:</b></u>
    The integration is done in T-code VKOA
    <u>  1. Sales Order Created</u> 
            -No Entry-
      <u>2. PGI done (Goods issue)</u>
          Cost of Goods Sold     Dr (Configured in OBYC GBB T-Key)
               To Inventory Account
    <u>  3. Billing document released to Accounting</u>
            Customer Account Dr.
                  To Sales Revenue Account (ERL T-key in Pricing procedure)
      Note : The GL account is assigned to this ERL in VKOA
    <u> 4. Payment Received</u>
            Bank Clearing A/c Dr
                           Customer A/c Cr. 
    Points to Know : Good to understand the pricing procedure and how the different transaction keys are used like ERL, ERS etc

  • Help using -replace with wildcard characters, specifically braces

    Hello all,
    Needing help in using -replace with literal wildcard characters, specifically the braces characters. From reading old posts online this seems to have been a notorious shortcoming of PowerShell, but not sure if it's been resolved or not. My simple
    code tries to remove the braces as follows (would like to keep the foreach loop and everything as is if possible):
    $string = "test[]"
    $braces = @("``[","``]")
    Foreach($brace in $braces){
    If($string -like "*$brace*"){
    $string = $string -replace ($brace,"")
    write-host $string
    This code gives an error at the -replace line, saying "The regular expression pattern `] is not valid." I'm not sure how to pass the literal brace characters to the -replace parameter? Can this be done?

    -like is a wildcard operator (it recognized wildcard patterns like * ,? and [a-z].
    For a regular expression you use the -match operator.  
    Wildcard patterns and regular expressions are not interchangeable.
    See:
    get-help about_wildcards
    get-help about_regular_expressions
    for an explanation and examples of each one, and 
    get-help about_comparison_operators
    for examples of using -like and -match.
    [string](0..33|%{[char][int](46+("686552495351636652556262185355647068516270555358646562655775 0645570").substring(($_*2),2))})-replace " "

  • How do I access compacted mail on a Mac version 10.5.8 stuck with Thunderbird version 16.0.2 ? I am unable to access needed documentation for Taxes, etc

    How do I access compacted mail on a Mac version 10.5.8 stuck with Thunderbird version 16.0.2 ? I am unable to access needed documentation for Taxes, etc

    Where in the world did you read Deleting All My Mail? I have reread my answer several times and cannot seem to find that in there.
    When you mark a message for deletion it does just that. It marks it for deletion and hides the message. It is not truly deleted until you compact.
    My point is that unless you deleted your important mail they should still be there somewhere.
    Your question was about compacting and thinking it put your messages in a nice little box for safe keeping and now you want to open it.
    I have to agree that Thunderbird did a horrible job of naming this process because most are like you and do not understand what it actually does. I included the link to the explanation of what compacting means in the Thunderbird world.
    Your messages may still be available to your but finding them has nothing to do with compacting.
    Thunderbird does not archive anything unless you use that process by selecting the message and pressing a. You have the option to setup where you want that archive to go and what folders to make.
    The All Mail folder is a goofy gmail arrangement. If you have problems with that then you need to address that with Google.
    If you go into your gmail account on the gmail site do you see the messages you are hunting in the All Mail folder there?

  • HT202667 Hi - My daughter was using her Apple TV until recently when she got a Smart TV.  Now the Apple TV is not needed so she passed it on to me.  How do I get it transferred over from her Home Sharing account to mine so that I can use it with my PC?

    Hi - My daughter was using her Apple TV until recently when she got a Smart TV.  Now the Apple TV is not needed so she passed it on to me.  How do I get her Home Sharing account transferred over to mine so that I can use it with my PC? Thanks!

    As  Winston Churchill wrote, however you might want to do a factory reset on the Apple TV.
    This way all information pertaining to your daughter will be removed from the device. Specifically if see was sign into any of the streaming service, Netflix, Hulu, etc. her credentials will still be associated with this Apple TV, doing  a factory reset will remove all that and make it as if you purchased the device and just plugged it in.
    regards

  • I am new to IPAD and I want o use facetime, how can I use it to communicate with my mac at home, do I need to create another account with a different email account

    I am new to IPAD and I want o use facetime, how can I use it to communicate with my mac at home, do I need to create another account with a different email account

    do I need to create another account with a different email account
    Yes, the email addresses need to be unique to each device. You may use the same Apple ID on each device, but the email address used by each device needs to be different.

  • Using Excel with Visual C++ 6.0 (need a graph control that behaves as much like the one in CVI as possible)

    I hate to beat this to death but I was unable to find a
    clear answer to this question.  Does NI provide Excel control from within
    Visual C++ 6.0? 
    I read that NI supports the ANSI-C library only for Visual C++ 6.0 users:
    Thread : "Re: Benifits of using measurment
    studio for VC++ 6.0?"
    NI REP : drohacek
    Quote  : "we made the decision to support Visual
    C++ 6.0 users only through the ANSI-C interface and not through the Measurement
    Studio MFC-based class libraries."
    If there is a suggested way of controlling Excel from within Measurement Studio
    for Visual C++ 6.0 then I’d love to know it. 
    If not, can a plain statement be made basically stating that if you want
    to control Excel you can’t use a Visual C++ 6.0 environment even with Measurement
    Studio support?
    With .NET of course you can just decide to have Excel support added during
    project creation.  CVI can act as an ActiveX server and easily control
    Excel just by building off the examples shipped with CVI.  I see that
    there is support, using the Measurement Studio for Visual C++ 6.0 Project Wizard,
    for taking existing CVI projects and converting them to Visual C++ 6.0 projects
    or for calling CVI libraries from a .dll from within Visual C++ 6.0.  I suppose I could do the work
    in CVI and then convert the project but I'm so deeply tied into all my MFC calls that I don't see
    how I can cleanly include the CVI libraries into my existing VC++ 6.0 projects.
    What I'm really after here is a visual graph control like the one in CVI that I
    can use from Visual C++ 6.0.  I purchased a 3rd party graph control for use
    in VC++ 6.0 that works well but isn't really visual.  I mean you can't
    enter any values in it until you run the program and fill it out programmatically. 
    Then you can see which columns are two narrow, quit the program, adjust the
    column width of your now empty control, and repeat, until you get the thing
    looking the way you want.  If I could call into Excel from within Visual
    C++ 6.0  the way I do from within .NET
    then I could use Excel to hold the table and just read in the values into my table
    control at run time.  Basically I'd use Excel as a visual development tool
    for all my tables.
    I do all my coding from within CVI and Measurement Studio for Visual C++
    6.0.  I'd use CVI for everything if I didn't depend so heavily on certain
    outside controlled C++ .dll's.  Could you please suggest then what I can
    do to get Excel support for Visual C++ 6.0?
    Last question :
    Is there any plan to ever have a NI table control like the CVI table control for
    use in Visual Studio?  One that you can
    completely set up before you do any compiling? 
    I imagine that the way Microsoft sets up their environment makes this idea impossible.  Otherwise someone would
    have come up with a truly “visual” table control before now.
    Thanks,
    Grant
    Grant M. Johnson
    Project Engineer
    LECO Corporation

    Hello Grant
    You can most certainly use Excel with VC++ 6.0. Measurement Studio won't provided you with any classes to talk to Excel in VC++ 6.0. This is because Excel allows control via Automation and you can use its automation API to do anything you need with Excel. This is what CVI uses as well.
    You can see this MSDN article on how to set this up. This mentions VC.NET, but it should work the same way.
    Here is one that talks about VC 6.0 and Excel.
    Here is a code project article about this.
    Even with .NET, you have to do thru the Excel Automation support. Excel started shipping with Primary Interop Assemblies (PIA) which are .NET wrappers about the Excel Automation object model. C++ Automation is definetely not as nice as .NET, BTW
    See this document for more information about the Excel object model.
    I would not recommend using the CVI Excel libraries if all you want to use them for is Excel automation. You will end up creating un-necessary dependencies and go through extra layers that way. You can make calls straight to Excel from VC++ without requiring CVI.
    One quick observation about your excel approach. If you decide to use Excel as your table, you might be requiring everyone who uses your application to have Excel installed on their machines. Just wanted to make sure this was acceptable to you.
    Have you looked at the Datagrid Activex control, which is one of the common controls that ships with Visual Studio? You can add it to Visual Studio by right-clicking and picking it from the list of installed activex control. If you have not already, you should check it out.
    Microsoft has made significant improvements in the number of controls they provide with .NET. They have a Datagrid control that seems to be what you need.
    Measurement Studio did add some high level classes for Excel and Word Automation that simplify some common tasks, but these exists for VS 2003 C++ and VS 2005 C++, not for VC 6.0. Underneath, we end up using the same Excel automation classes, so you can easily setup something similar for VC 6.0. Plus you can find alot of references online on how to use the Excel Automation object model with C++.
    We currently have no plans in Measurement Studio to create a table control unfortunately. I am assuming when you said graph, you actually meant table, since Measurement Studio already  provides a ActiveX graph controls for VC++ 6.0 that is very similar to the CVI graph.
    On a side note, VC++ 6.0 is really really old. Have you considered upgrading?
    To summarize
    - Yes, you can use Excel with Vc++ 6.0 without mstudio.
    - Try using the Datagrid Activex control if you just need a table.
    - Measurement Studio provides high-level excel and word classes for VC++ 6.0
    - Measurement Studio provides a graph control for VC++ 6.0 which is very similar to the CVI graph.
    - Measuremnt Studio does not have a table control.
    - VC++ 6.0 is really really old. Have you considered upgrading?
    Bilal Durrani
    NI

  • I tried to play a song. But it says I need to authorize my computer with a very old apple id I dont use anymore and I cant play the song. How do I fix this?

    I am trying to play a song I bought and it is saying I need to authorize my computer to use it with a very old id that I no longer use for apple. How do I get all my music back?

    You need to authorize the computer with that specific Apple ID. If that account's inaccessible, delete the song and then purchase it from your current Apple ID, or click here and ask the iTunes Store staff for assistance.
    (110985)

  • Please help me, I need to use Flex with CF

    Hi everyone,
    I am starting to retract my brain from an intense 2 days to
    figure out how to use Flex with Coldfusion. I am using Coldfusion 8
    Beta (this part is good, don't need help for CF itself). I am also
    using Flex Builder 2 (with chart but this not the topic). I
    installed FDS 2.5 before to install ColdFusion 8 but I think CF8
    have is own FDS or something like that... anyway, it might help to
    mention it!
    Well, I tried HTTPService, RemoteObject, WebSer vice -
    NOTHING WORKS!!! Argh! Did I mention I spent 2 days? ;-)))
    Well, I start with the basic: a login form with an email (as
    a username) and a password to be validated. I have a CFC to do the
    validation and return a simple message (string): "OK' when it is
    valid and a custom message when it is not valid; depending if it is
    the password and/or the email which is not valid.
    I always got an error. Since the error is different depending
    of the method I use, I will explain the latest method I used in
    this message and try to concentrate on that method specifically!
    The method is WebService and here is the error:
    faultCode:Server.Error.Request
    faultString:'HTTP request error'
    faultDetail: 'Error: [IOErrorEvent type="ioError"
    bubbles:false cancelable=false eventPhase=2
    text="Error #2032: Stream Error .
    URL=http://localhost:8501/iDashboard/login.cfc"].
    URL: http://localhost:8501/iDashboard/login.cfc'
    Any help will be very useful!!!
    Thank's

    Cyber,
    This may be what you are looking for. It worked well for me.
    Flex is sweet, but with the number of people confused about setup
    with CF they sure aren't making any friends.
    Flex/ColdFusion
    setup

  • Hello i try to use another SIM card with my iphone 4s now it said i need to unlock the phone with my Sim carrier

    Hello i try to use another SIM card with my iphone 4s now it said i need to unlock the phone with my Sim carrier ... here is what it says below
    The SIM card inserted in this iPhone does not appear to be supported.
    The SIM card that you currently have installed in this iPhone is from a carrier that is not supported under the activation policy that is currently assigned by the activation server. This is not a hardware issue with the iPhone. Please insert another SIM card from a supported carrier or request that this iPhone be unlocked by your carrier. Please contact Apple for more information.

    So..  You need to contact the carrier for the iPhone's original sim card, and request they unlock it.  The carrier is the only one that can unlock the sim of the iPhone.

  • HT201070 I currently use OS 10.6.8 and Aperture 3, and just got a Nikon D600. It seems the the RAW Compatibility updates (4.01) are for use only with OS 10.7.5 or later, is that right? Do I need to update my whole OS to use this camera? Thank you!

    I currently use OS 10.6.8 and Aperture 3, and just got a Nikon D600. It seems the the RAW Compatibility updates (4.01) are for use only with OS 10.7.5 or later, is that right? Do I need to update my whole OS to use this camera? Thank you!

    Thanks to Bobthefisherman & Turbostar.  Turns out I've got a corrupted disk (which I found out via "verify disk" on Disk Utility First Aid.  Previously, I never thought to verify disk -- only to repair permissions -- so I never knew my HD had been corrupted.
    Wasn't able to do a clean install of OSX10.6 because my SuperDrive only sporadically will load discs, so I am taking it to the Apple Store to see if they can do a clean install, and depending upon costs, get the Superdrive replaced. 
    The HD wasn't partioned by the way.  And I did have just over 40GB of contiguous space. 
    Thanks again.

  • I have a 160GB Hard Drive in my MBP and use VMWare Fusion and had a 60GB Virtual Machine running Windows XP. Deleted the Virtual Machine and CANNOT find the 60GB space I desperately need!  Anybody out there with a similar problem?  Help!

    I have a 160GB Hard Drive in my MBP and use VMWare Fusion and had a 60GB Virtual Machine running Windows XP. Deleted the Virtual Machine and CANNOT find the 60GB space I desperately need!  Anybody out there with a similar problem?  Help!

    Thanks - Of Course the first thing I checked and did.
    Disc Utility reads as follows:
    Capacity : 159.18 GB (159,182,127,104 Bytes)
      Format : Mac OS Extended (Journaled)  Available : 11.47 GB (11,472,896,000 Bytes)
      Owners Enabled : Yes  Used : 147.71 GB (147,709,231,104 Bytes)
      Number of Folders : 139,540  Number of Files : 511,832
    Activity Monitor(Disc Usage) shows something quite interesting.  Mac HD and Ramanan (Main User) - My hard drive is only 160GB!  Would the retired engineer gentleman please note as well.  Many thanks. Rams

Maybe you are looking for