none
Excel extract file info - how to RRS feed

  • Question

  • This maybe the incorrect forum but since I mention Excel I thought it best to start here.

    I have a proprietary file format that I would like to expose properties to an app like excel for costing and general information exposure. What would be the best approach for this? The current application that handles all the file manipulation, design, etc. is written in VS2010 and is C++.

    More info:

    The proprietary file contains things like colors which refer to color cartridges that have a price. Also the file contains shapes that are filled with these colors, there is also font usage, etc

    For costing calculations a user may want to use excel, specify one of these files and extract info like color usage area and then determine within excel their cost and amount needed to process the file.

    So what I'm looking for via C++ is how can excel extract the needed info from the file. The example I've given above is just a sample of the info in the file and what a user may want to do with it. I do not want to "automate" excel, I want excel to be able to extract info from the file.

    Thanks in advance

    Wednesday, March 25, 2015 12:21 PM

Answers

  • I think I'm going to take the OpenXML route on this. That way it will provide a standard format for outsiders to use. But to answer your questions.

    The file I have is a graphics design file similar to a Illustrator or CorelDRAW file. In the file we have saved info like the following:

    design time

    colors used

    options (tools) used i.e. special effects, outline, shadow, etc

    fonts used

    area used per color

    etc

    My thoughts were that from Excel (I'm not and Excel user but thought it could do this) was to "call up" the specified file and then call a function from the written dll that I would write and get the particular info.

    • Marked as answer by GSP_T Thursday, April 2, 2015 2:57 PM
    Thursday, April 2, 2015 2:57 PM

All replies

  • Hi GSP_T,

    >> So what I'm looking for via C++ is how can excel extract the needed info from the file

    Apps for office is used to create engaging new consumer and enterprise experiences that run within supported Office 2013 applications by using the power of the web and standard web technologies such as HTML5, XML, CSS3, JavaScript, and REST APIs.

    Based on your description, do you want to get the information from the excel file instead of developing excel? If so, I am afraid that you posted in an incorrect forum.

    As far as I know, if you want to get the information from the excel file by your project, you could use the OpenXml,

    but you could not call OpenXML sdk in c++. If you want to use c++ approach, you could refer to the link below:

    # Using Open XML SDK in C++?
    https://social.msdn.microsoft.com/Forums/office/en-US/d043b049-7203-437b-94dd-a9d21effa1a2/using-open-xml-sdk-in-c?forum=oxmlsdk

    Best Regards,

    Edward


    We are trying to better understand customer views on social support experience, so your participation in this interview project would be greatly appreciated if you have time. Thanks for helping make community forums a great place.
    Click HERE to participate the survey.

    Thursday, March 26, 2015 12:15 PM
  • No, what I want to happen is for programs like Excel be able to extract info about my file's internal properties into an  excel like app.
    Thursday, March 26, 2015 1:31 PM
  • Hi GSP_T,

    Do you mean you want to get the information from your proprietary file format, and store it in the Excel file?

    I am not familiar with C++, but for store the information into Excel, you could use the C# with Office Object mode.

    #How to: Store and Retrieve Date Values in Excel Ranges

    https://msdn.microsoft.com/en-US/library/1ad4d8d6(v=vs.80).aspx

    With openxml, you could refer the link below:

    #Read and Write Microsoft Excel with Open XML SDK

    http://www.codeproject.com/Articles/670141/Read-and-Write-Microsoft-Excel-with-Open-XML-SDK

    Best Regards,

    Tony


    Help each other

    Friday, March 27, 2015 11:13 AM
  • Hi GSP_T,

    Have you resolved your issue? If not, could you share us more information about your issue?

    What do you mean with "extract info "? Are they the date or anything else?

    What do you mean with "my file's internal properties"? Are the file path and file name?

    Best Regards,

    Edward


    We are trying to better understand customer views on social support experience, so your participation in this interview project would be greatly appreciated if you have time. Thanks for helping make community forums a great place.
    Click HERE to participate the survey.

    Thursday, April 2, 2015 1:19 PM
  • I think I'm going to take the OpenXML route on this. That way it will provide a standard format for outsiders to use. But to answer your questions.

    The file I have is a graphics design file similar to a Illustrator or CorelDRAW file. In the file we have saved info like the following:

    design time

    colors used

    options (tools) used i.e. special effects, outline, shadow, etc

    fonts used

    area used per color

    etc

    My thoughts were that from Excel (I'm not and Excel user but thought it could do this) was to "call up" the specified file and then call a function from the written dll that I would write and get the particular info.

    • Marked as answer by GSP_T Thursday, April 2, 2015 2:57 PM
    Thursday, April 2, 2015 2:57 PM