Hello,
Hi Mateusz,
Ok, I have attached example file.
Hi again,
I created pivot in Excel. On the server I get new data and refresh pivot data source. Date are correct, only texts are in English.
Hi there,
Hi Mateusz,
Hi,
Thank you!
//Setting the custom globalization class
wb.Settings.GlobalizationSettings = new CustomGlobalPolish();
PivotTable pt = wb.Worksheets[1].PivotTables[0];
pt.RefreshDataFlag = true;
pt.RefreshData();
pt.CalculateData();
pt.RefreshDataFlag = false;
PdfSaveOptions options = new PdfSaveOptions();
options.OnePagePerSheet = true;
wb.Save(filePath + “out_polish.pdf”, options);
//----------------------------------------------------------------
//----------------------------------------------------------------
//----------------------------------------------------------------
//----------------------------------------------------------------
//----------------------------------------------------------------
private class CustomGlobalPolish : GlobalizationSettings
{
///
/// Gets the name of “Total” label in the PivotTable.
/// You need to override this method when the PivotTable contains two or more PivotFields in the data area.
///
/// The name of “Total” label
public override string GetPivotTotalName()
{
return “Total”;
}
/// <summary>
/// Gets the name of "Grand Total" label in the PivotTable.
/// </summary>
/// <returns>The name of "Grand Total" label</returns>
public override string GetPivotGrandTotalName()
{
return "Suma końcowa";//polish
}
/// <summary>
/// Gets the name of "(Multiple Items)" label in the PivotTable.
/// </summary>
/// <returns>The name of "(Multiple Items)" label</returns>
public override string GetMultipleItemsName()
{
return "(Multiple Items)";
}
/// <summary>
/// Gets the name of "(All)" label in the PivotTable.
/// </summary>
/// <returns>The name of "(All)" label</returns>
public override string GetAllName()
{
return "(All)";
}
/// <summary>
/// Gets the name of "Column Labels" label in the PivotTable.
/// </summary>
/// <returns>The name of column labels</returns>
public override string GetColumnLablesName()
{
return "Column Labels";
}
/// <summary>
/// Gets the name of "Row Labels" label in the PivotTable.
/// </summary>
/// <returns>The name of row labels</returns>
public override string GetRowLablesName()
{
return "Row Labels";
}
/// <summary>
/// Gets the name of "(blank)" label in the PivotTable.
/// </summary>
/// <returns>The name of empty data</returns>
public override string GetEmptyDataName()
{
return "(blank)";
}
/// <summary>
/// Gets the name of <see cref="PivotFieldSubtotalType"/> type in the PivotTable.
/// </summary>
/// <param name="subTotalType">The <see cref="PivotFieldSubtotalType"/> type</param>
/// <returns>The name of <see cref="PivotFieldSubtotalType"/> type</returns>
public override string GetSubTotalName(PivotFieldSubtotalType subTotalType)
{
switch (subTotalType)
{
case PivotFieldSubtotalType.Sum:
return "Suma";//polish
case PivotFieldSubtotalType.Count:
return "Count";
case PivotFieldSubtotalType.Average:
return "Average";
case PivotFieldSubtotalType.Max:
return "Max";
case PivotFieldSubtotalType.Min:
return "Min";
case PivotFieldSubtotalType.Product:
return "Product";
case PivotFieldSubtotalType.CountNums:
return "Count";
case PivotFieldSubtotalType.Stdev:
return "StdDev";
case PivotFieldSubtotalType.Stdevp:
return "StdDevp";
case PivotFieldSubtotalType.Var:
return "Var";
case PivotFieldSubtotalType.Varp:
return "Varp";
}
return "Suma";//polish
}
}
The issues you have found earlier (filed as CELLSNET-45037) have been fixed in Aspose.Cells for .NET 17.3.0.
This message was posted using Notification2Forum from Downloads module by Aspose Notifier.