none
Visual Studio 2010 and/or Excel 2010, XMLMappedRanged and Cell Styles? RRS feed

  • Question

  • Has there been any changes or discussions on adding the ability to define Style Names, possibly as Attributes of an XSD Element of an XMLMappedRange?  XMLMappedRanges are truely the fastest way to get data in and out of an Excel Workbook.  However the limitations and performance issues surrounding applying styles to the data you've imported into a Workbook can be staggering.  Though I'd like to see a full range of cell level settings by usage of Attributes on the XML that's imported, at a minimum, it would be ideal to have at least one attribute, "StyleName", where developers can simply set their data value, apply the cell style name to the attribute, of the xml element, that holds the data value.

    Has there been any momentum on something like this?  It would be a huge boon for developers working on the Excel platform.

    Just to clarify, an example would be.

    <?xml version="1.0" encoding="utf-8"?>
    <xs:schema id="MyDocumentLevelCustomization_Data" xmlns="http://tempuri.org/MyDocumentLevelCustomization_Data.xsd" xmlns:mstns="http://tempuri.org/MyDocumentLevelCustomization_Data" xmlns:xs="http://www.w3.org/2001/XMLSchema">
      <xs:element name="MyDocumentLevelCustomizationData">
        <xs:complexType>
          <xs:sequence>
            <xs:element name="MyRecordID" type="xs:string" minOccurs="0" maxOccurs="1"/>
            <xs:element name="MyRecordTitle" type="xs:string" minOccurs="0" maxOccurs="1"/>
            <xs:element name="MyRecordNotes" type="xs:string" minOccurs="0" maxOccurs="1"/>
            <xs:element name="MyRecordsItemCollection" minOccurs="0" maxOccurs="unbounded">
              <xs:complexType>
                <xs:sequence>
                  <xs:element name="ItemID" type="xs:string" minOccurs="0" maxOccurs="1" />
                  <xs:element name="ItemNote" type="xs:string" minOccurs="0" maxOccurs="1" />
                  <xs:element name="ItemAmount" type="xs:decimal" minOccurs="0" maxOccurs="1" />
                  <xs:element name="ItemResponsiblePerson" type="xs:decimal" minOccurs="0" maxOccurs="1" />
                </xs:sequence>
              </xs:complexType>
            </xs:element>
    
          </xs:sequence>
        </xs:complexType>
      </xs:element>
    </xs:schema>

    <MyDocumentLevelCustomizationData>
    	<MyRecordID StyleName="MyCustomHeaderHiddenStyleName">1</MyRecordID>
    	<MyRecordTitle StyleName="MyCustomHeaderValidTextStyleName">This is my first record!</MyRecordTitle>
    	<MyRecordNotes StyleName="MyCustomheaderDataEntryRequiredStyleName" />
    	<MyRecordsItemCollection>
    		<ItemID StyleName="MyCustomLineItemHiddenStyleName">ABCD-EFG-HIJ-KLMNO</ItemID>
    		<ItemNote StyleName="MyCustomLineItemValidTextualDataStyleName">This is a note for the responsible person.</ItemNote>
    		<ItemAmount StyleName="MyCustomLineItemUSCurrencyStyleName">5.99</ItemAmount>
    		<ItemResponsiblePerson StyleName="MyCustomLineItemDataEntryRequiredStyleName" />
    	</MyRecordsItemCollection>
    
    </MyDocumentLevelCustomizationData>

    Note the XSD and XML was hand coded just now so it may lack 100% structure accuracy, but I think this get's the point accross that I want to imporr the sample XML and have Excel automatically identify and apply the stylename I set, whether I have a data value or not.

    Thanks


    Rob





    • Edited by Rob K In Dev Thursday, March 8, 2012 6:23 PM keep trying to fix some custom code
    Thursday, March 8, 2012 6:06 PM

Answers

  • Hi Rob,

    Your question can be paraphrased to "Here is an idea for a powerful, productive feature:
    Add the ability to define Style Names, possibly as Attributes of an XSD Element of an XMLMappedRange.  XMLMappedRanges are truely the fastest way to get data in and out of an Excel Workbook.  However the limitations and performance issues surrounding applying styles to the data you've imported into a Workbook can be staggering.  Though I'd like to see a full range of cell level settings by usage of Attributes on the XML that's imported, at a minimum, it would be ideal to have at least one attribute, "StyleName", where developers can simply set their data value, apply the cell style name to the attribute, of the xml element, that holds the data value."

    Microsoft Office Product Managers are ravenous for the improvements their customers need, and welcom suggestions.  There is a web page where you can submit yours at

    Submit Feedback - Office.com
    http://office.microsoft.com/en-us/suggestions.aspx
    There is a text box where you enter the suggeston, and a submit button. The textbox has a 500 character limit. The paraphrase above has 710 characters so you need to edit it to fit. Incidentally, the web page is dated 2012. You are asked to agree to terms and conditions to the effect that you give Microsoft your suggestion without ever expecting to claim property, patent, copyright or compensation.

    Thanks for your suggestion.
    Regards,
    Chris Jensen
    Senior Technical Support Lead



    Chris Jensen

    • Proposed as answer by cjatmsModerator Monday, March 19, 2012 1:22 PM
    • Marked as answer by Bruce Song Wednesday, April 4, 2012 3:29 AM
    Thursday, March 15, 2012 8:24 PM
    Moderator

All replies

  • BTW, any other developers out there reading this using XMLMappedRanges, can you please add your 2 cents as to whether or not you find a benifit to this type of feature?

    Thanks


    Rob

    Thursday, March 8, 2012 6:37 PM
  • Hi Rob,

    Thanks for poting in the MSDN Forum.

    What's mean of XMLMappedRanges? As far as I know, that Office PIA doesn't have such kind of Object.

    Have a good day,

    Tom


    Tom Xu [MSFT]
    MSDN Community Support | Feedback to us

    Monday, March 12, 2012 7:20 AM
    Moderator
  • Hi Rob,

    Your question can be paraphrased to "Here is an idea for a powerful, productive feature:
    Add the ability to define Style Names, possibly as Attributes of an XSD Element of an XMLMappedRange.  XMLMappedRanges are truely the fastest way to get data in and out of an Excel Workbook.  However the limitations and performance issues surrounding applying styles to the data you've imported into a Workbook can be staggering.  Though I'd like to see a full range of cell level settings by usage of Attributes on the XML that's imported, at a minimum, it would be ideal to have at least one attribute, "StyleName", where developers can simply set their data value, apply the cell style name to the attribute, of the xml element, that holds the data value."

    Microsoft Office Product Managers are ravenous for the improvements their customers need, and welcom suggestions.  There is a web page where you can submit yours at

    Submit Feedback - Office.com
    http://office.microsoft.com/en-us/suggestions.aspx
    There is a text box where you enter the suggeston, and a submit button. The textbox has a 500 character limit. The paraphrase above has 710 characters so you need to edit it to fit. Incidentally, the web page is dated 2012. You are asked to agree to terms and conditions to the effect that you give Microsoft your suggestion without ever expecting to claim property, patent, copyright or compensation.

    Thanks for your suggestion.
    Regards,
    Chris Jensen
    Senior Technical Support Lead



    Chris Jensen

    • Proposed as answer by cjatmsModerator Monday, March 19, 2012 1:22 PM
    • Marked as answer by Bruce Song Wednesday, April 4, 2012 3:29 AM
    Thursday, March 15, 2012 8:24 PM
    Moderator