none
Excel.PivotTable.SourceData returns range in a incorrect style for Finnish language RRS feed

  • Question

  • I am accessing Excel.PivotTable.SourceData property to get the data source of the pivot. In my case the data source is Microsoft Excel list. Therefore, the SourceData property returning me cell reference as text in xlR1C1 Reference Style

    Example:

    Excel.PivotTable pivotTable;
    String pivotSourceData = (string)pivotTable.SourceData;
    
    //here pivotSourceData is set to "Sheet1!R3C1:R4C2" for English language but gets value "Sheet1!R3S1:R4S2" for Finnish language;

    This is working fine when I am using Office display language English ( Ex: "Sheet1!R3C1:R4C2").

    But one of my customer using Office display language Finnish. For that customer the SourceData property is not returning cell reference according to xlR1C1 style correctly. Instead of that it returns the cell reference as R1S1 ( Ex: "Sheet1!R3S1:R4S2").

    I am converting this range to xlA1 format later using Excel ConvertFormula method. That also fails to convert the reference that returns for Finnish language.

    The Finnish word for 'Column' is 'sarake'. Is that the reason it returned me source data as R1S1? If that is the case, do I need to write custom code to convert returned SourceData string back to xlR1C1 style for each language?

    Your help greatly appreciated.

    Thank you

    Voshitha





    • Edited by voshee Wednesday, September 25, 2013 10:39 AM
    Wednesday, September 25, 2013 8:53 AM

All replies

  • Hi Voshitha,

    Thank you for posting in the MSDN Forum.

    I'm trying to involve some senior engineers into this issue and it will take
    some time. Your patience will be greatly appreciated.

    Sorry for any inconvenience and have a nice day!

    Best regards,

    Fei


    <THE CONTENT IS PROVIDED "AS IS" WITHOUT WARRANTY OF ANY KIND, WHETHER EXPRESS OR IMPLIED>
    Thanks
    MSDN Community Support

    Please remember to "Mark as Answer" the responses that resolved your issue. It is a common way to recognize those who have helped you, and makes it easier for other visitors to find the resolution later.

    Monday, September 30, 2013 12:17 PM
    Moderator
  • Hi Fei,

    Thank you.

    More information about my Visual Studio Solution.

    Target Excel version: Excel 2010

    Technology: VSTO 2010 , Target .NET Framework: .NET 4.0

    /Voshitha



    • Edited by voshee Wednesday, October 9, 2013 4:58 AM
    Tuesday, October 1, 2013 5:27 AM
  • Hi Voshitha,

    Did you try setting the Current thread culture to en-US at the start of your application and reset back on exit.

    Here is an article which may also help here.

    Creating Office Solutions for Use in Multiple Countries/Regions
    http://msdn.microsoft.com/en-us/library/aa168494(office.11).aspx#odc_vstmultcr_topic04

    Regards

    Sangeeth


    Sangeeth,MSFT

    Monday, October 14, 2013 11:52 PM
  • Hi Sangeeth,

    Thank you.

    Previously I tried this,

    Thread.CurrentThread.CurrentCulture = new CultureInfo(1033);

    here, 1033 = En-us

    But this didn't solved my problem. Still I got SourceData as R1S1.

    /Regards,

    Voshitha

    Wednesday, October 16, 2013 8:10 AM
  • Hello Voshitha,

    This question requires more in-depth support, please visit the below link to see the various paid support
    options that are available to better meet your needs. http://support.microsoft.com/default.aspx?id=fh;en-us;offerprophone.

    Regards

    Pradip

    Friday, November 1, 2013 8:43 AM