We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
2.7.1
xlsx
XLSX file: pepa.xlsx
Html result: pepa.txt
Here's the code
System.Globalization.CultureInfo customCulture = (System.Globalization.CultureInfo)Thread.CurrentThread.CurrentCulture.Clone(); customCulture.NumberFormat.NumberDecimalSeparator = "."; Thread.CurrentThread.CurrentCulture = customCulture; (typeof(IndexedColors).GetField("mappingIndex", BindingFlags.Static | BindingFlags.NonPublic) .GetValue(null) as Dictionary<int, IndexedColors>)[0] = IndexedColors.Black; var workbook = new XSSFWorkbook("pepa.xlsx"); var converter = new ExcelToHtmlConverter(); converter.OutputColumnHeaders = false; converter.OutputRowNumbers = false; converter.ProcessWorkbook(workbook); converter.Document.Save("pepa.html");
After convertion html code contains styles for table rows, but tr tags dont have assigned classes.
The text was updated successfully, but these errors were encountered:
@batyadmx HtmlDocumentFacade is erro public void AddStyleClass(XmlElement element, string classNamePrefix, string style) { string exising = element.GetAttribute("class"); string addition = GetOrCreateCssClass(element.Name, classNamePrefix, style); string newClassValue = string.IsNullOrEmpty(exising) ? addition : (exising + " " + addition); element.SetAttribute("class", newClassValue); }
public void AddStyleClass(XmlElement element, string classNamePrefix, string style) { string exising = element.GetAttribute("class"); string addition = GetOrCreateCssClass(element.Name, classNamePrefix, style); string newClassValue = string.IsNullOrEmpty(exising) ? addition : (exising + " " + addition); element.SetAttribute("class", newClassValue); }
update ` public void AddStyleClass(XmlElement element, string classNamePrefix, string style) { string exising = element.GetAttribute("class"); string addition = GetOrCreateCssClass(element.Name, classNamePrefix, style); string newClassValue = string.IsNullOrEmpty(exising) ? addition : (exising + " " + addition);
element.SetAttribute("class", newClassValue); }
`
Sorry, something went wrong.
Successfully merging a pull request may close this issue.
NPOI Version
2.7.1
File Type
xlsx
Upload the Excel File
XLSX file:
pepa.xlsx
Html result:
pepa.txt
Reproduce Steps
Here's the code
Issue Description
After convertion html code contains styles for table rows, but tr tags dont have assigned classes.
The text was updated successfully, but these errors were encountered: