Html tags/attributes like Br- Bold are supported or not supported by Aspose.cells?

Hi All


There is a problem while rendering HTML Text Containing Bold Tags and Break Tags .

I have Filled the Text Containing HTML in the Excel Sheet Cell which reads data from the excel using aspose.cell and then Uploaded in the Application .

The Break Tags Are Removed when they are rendered on the User Interface .

Are Break Tags , Bold Tags Supported by Aspose.cells

I have also Attached a Image File that shows the Issue Pictorially .

I Have mentioned the Text Below which has Formatting Applied to it . But it is getting rendered without any Enter Spaces that occur between the Statements mentioned below .

• Barely five months after the State government announced its plan to open a chain of Amma Pharmacies in different parts of the State aimed at selling medicines and drugs at a discount, the Department of Cooperatives, the nodal agency to implement the project, opened the first Amma pharmacy here on Wednesday.

• It is located on 11th Cross in Thillai Nagar, which is a health care hub in Tiruchi. Besides standard medicines and drugs, it has employed qualified staff members to handle the medicines as per the prescribed rules.


• The pharmacy was declared open by T.P. Poonatchi, Minister for Khadi and Village Industries. R. Manoharan, chief whip, and Jayashree Muralidharan, Collector.

• N. Mirunalini, Joint Registrar, Cooperatives, and Managing Director, Tiruchirappalli District Central Cooperative Bank, told The Hindu that medicines would be sold at 12 per cent discount on the maximum retail price. Consumers could rely on medicines as quality was a top priority. Computerised bills would contain all details including date of expiry of drugs. It would sensitise the customers.
• Stating that it would tilt the customers towards Amma Pharmacy, she said it had been located at a strategic places to cater to the needy customers. Although sale target was yet to be fixed, the indication on the first day of opening suggested that it would be big hit among the people. Besides common and popular medicines, life saving drugs would be made available at the pharmacies.
• Ms. Mirunalini said two more Amma Pharmacny would be opened, one at Srirangam and another at Amaravathi market, within a few weeks in the city. Possibilities of opening more pharmacies in other parts of the district would be explored and proposal would be sent to the government soon.
• The Minister inaugurated an Amma Pharmacy at Thuraiyur on Wednesday.

Thanks for the Help .
Rishi

Hi,


Thanks for providing us some details and screen shot.

Aspose.Cells supports MS Excel oriented HTML file to read and write. Could you provide us your template HTML file or/and paste your sample code here to reproduce the issue on our end, we will check your issue soon.

Thank you.

Hi Amjad Sahi

Thanks For the Quick Reply .

Please Find the Attached HTML Template File.txt that Contains HTML of the Page .

I am also mentioning the Text below which in the HTML Template File has Formatting issue .

Please Search for the Below Text in the Attached HTML Template.txt File .

• Barely five months after the State government announced its plan to open a chain of Amma Pharmacies in different parts of the State aimed at selling medicines and drugs at a discount, the Department of Cooperatives, the nodal agency to implement the project, opened the first Amma pharmacy here on Wednesday. • It is located on 11th Cross in Thillai Nagar, which is a health care hub in Tiruchi. Besides standard medicines and drugs, it has employed qualified staff members to handle the medicines as per the prescribed rules. • The pharmacy was declared open by T.P. Poonatchi, Minister for Khadi and Village Industries. R. Manoharan, chief whip, and Jayashree Muralidharan, Collector. • N. Mirunalini, Joint Registrar, Cooperatives, and Managing Director, Tiruchirappalli District Central Cooperative Bank, told The Hindu that medicines would be sold at 12 per cent discount on the maximum retail price. Consumers could rely on medicines as quality was a top priority. Computerised bills would contain all details including date of expiry of drugs. It would sensitise the customers. • Stating that it would tilt the customers towards Amma Pharmacy, she said it had been located at a strategic places to cater to the needy customers. Although sale target was yet to be fixed, the indication on the first day of opening suggested that it would be big hit among the people. Besides common and popular medicines, life saving drugs would be made available at the pharmacies. • Ms. Mirunalini said two more Amma Pharmacny would be opened, one at Srirangam and another at Amaravathi market, within a few weeks in the city. Possibilities of opening more pharmacies in other parts of the district would be explored and proposal would be sent to the government soon. • The Minister inaugurated an Amma Pharmacy at Thuraiyur on Wednesday. • Barely five months after the State government announced its plan to open a chain of Amma Pharmacies in different parts of the State aimed at selling medicines and drugs at a discount, the Department of Cooperatives, the nodal agency to implement the project, opened the first Amma pharmacy here on Wednesday. • It is located on 11th Cross in Thillai Nagar, which is a health care hub in Tiruchi. Besides standard medicines and drugs, it has employed qualified staff members to handle the medicines as per the prescribed rules. • The pharmacy was declared open by T.P. Poonatchi, Minister for Khadi and Village Industries. R. Manoharan, chief whip, and Jayashree Muralidharan, Collector. • N. Mirunalini, Joint Registrar, Cooperatives, and Managing Director, Tiruchirappalli District Central Cooperative Bank, told The Hindu that medicines would be sold at 12 per cent discount on the maximum retail price. Consumers could rely on medicines as quality was a top priority. Computerised bills would contain all details including date of expiry of drugs. It would sensitise the customers. • Stating that it would tilt the customers towards Amma Pharmacy, she said it had been located at a strategic places to cater to the needy customers. Although sale target was yet to be fixed, the indication on the first day of opening suggested that it would be big hit among the people. Besides common and popular medicines, life saving drugs would be made available at the pharmacies. • Ms. Mirunalini said two more Amma Pharmacny would be opened, one at Srirangam and another at Amaravathi market, within a few weeks in the city. Possibilities of opening more pharmacies in other parts of the district would be explored and proposal would be sent to the government soon. • The Minister inaugurated an Amma Pharmacy at Thuraiyur on Wednesday.

Please Find the Attached Sample Code.txt File .

Thanks

Rishi

Hi,


Thanks for the sample file and code segment.

Well, I have evaluated your scenario/ case a bit. I saved your provided file (by opening the .txt file into notepad and save it as “____.html”) to HTML file format and then I opened it into IE browser, it works the same way as Aspose.Cells does render it, see the screen shot for your reference:
http://prntscr.com/5aljmf

Thank you.

Hi Amjad Sahi


Thanks For The Quick Reply .

I have Attached the Excel Sheet that contain text that has formatting issues as discussed above .

Please Find the Attached Excel Sheet (Text.xlsx) .

Please Find the Text in the Excel Sheet (Text.xlsx) .

The Enter after every bullet point is missing after upload as shown in the Attached Snapshot(Image.jpg)

Please Find the Attached Snapshot of the Text that has Enter missing .

Thanks & Regards
Rishi


Hi,


Well, Aspose.Cells supports to create or render MS Excel oriented HTML file format only and follows MS Excel standards and specifications. I opened your template .html file (which I used in my previous reply) into MS Excel and the view is same as per my previous screen shot, see the screen shot here when the template .html file is opened into MS Excel:
http://prntscr.com/5annf1

If you still think it is an issue with Aspose.Cells, kindly create a sample HTML file in MS Excel manually with your desired text, save it, zip it and post us here, we will check it soon.

Thank you.

Hi Amjad


Thanks for the Quick Reply.

Please copy the text in the Attached Excel Sheet to a Notepad File and then save it with the Extension html to open it as a HTML Page .

You will notice that Text Present in the Excel Sheet has Enter Spaces in the between the Text But the Text that displays on the HTML Page After Copying the Text in Notepad and saving it with HTML Extension doesn’t keep the Enter Spaces present in the Text .

This is the Formatting issue that I am trying to explain it to you.

The Same Attached Excel sheet is attached in my previous Post.

Thanks
Rishi

Hi,


I have tested to open your template Text.xlsx file and save it to HTML via Aspose.Cells APIs (Aspose.Cells for .NET), it works fine, I have attached the output zipped file containing the HTML file with its resource files here for your reference.

Again, I like to tell Aspose.Cells renders Excel to HTML or HTML to Excel similar to what MS Excel does in MS Excel manually, it does not support general or common HTML files (same as MS Excel)
e.g
Sample code:

Workbook wb = new Workbook(“e:\test2\Text.xlsx”);
wb.Save(“e:\test2\outTest1.html”, SaveFormat.Html);


Thank you.

Hi Amjad


I have tried the same and its working fine if we save it as html but my scenario is different

When I tried to read cell data then format lost. Below is the sample code

Workbook wb = new Workbook(“C:\Aspose Folder\Text.xlsx”);
Worksheet worksheet = wb.Worksheets[0];
Cell cell = worksheet.Cells[0,0];
string celltxt = cell.HtmlString.ToString();
Response.Write(celltxt);

Please Try the Code mentioned above .

Thanks
Rishi Bhargava

Hi,


Thanks for the sample code.

Well, in your provided code, you are getting HTML String from A1 cell but your contents are in A2 cell, so you may change the line of code:
i.e.,
Cell cell = worksheet.Cells[0, 0];
with:
Cell cell = worksheet.Cells[1, 0];
it works fine as I print the HtmlString from A2 cell, see the screen shot attached here:

PS. I am using latest version/fix of the product i.e., Aspose.Cells for .NET v8.3.0.x, please try it if you are not already using it.

Thank you.

Hi Amjad


I have tried the above mentioned code which you suggested .
But it is still not working .

Thanks
Rishi Bhargava

Hi,


I used the following simplest lines of code with your template Excel file in a WinForm application with Aspose.Cells for .NET v8.3.0.3 (please try it), it works fine:
e.g
Sample code:

Workbook wb = new Workbook(“e:\test2\Text.xlsx”);
Worksheet worksheet = wb.Worksheets[0];
Cell cell = worksheet.Cells[1, 0];
string celltxt = cell.HtmlString.ToString();
MessageBox.Show(celltxt);

If you still find the issue with v8.3.0.3, kindly create a simple project with v8.3.0.3 using your template file, zip it and post us here to reproduce the issue on our end, we will check it soon.

Thank you.

Hi


I have tried it using Aspose.cells for .NET v8.3.0.3 for a Web Application as you mentioned above and the issue of Formatting still occurs whereas for a Windows Application with Aspose.cells for .NET v8.3.0.3 the Font Tag is Displayed in the Alert Box .

Please find the attached snapshot (Snapshot.jpg) which displays the Font tag is still getting displayed for a windows application .

I have attached a Zip File which contains the web Application that I created that has formatting issue .

Please Find the Attached Zip File(WebApplication_Aspose.zip).

Thanks
Rishi Bhargava
Hi,

Thanks for the sample project.

Well, the MessageBox.Show only displays the HTML string but not parses it, so you are seeing contents embedded in Font tag.

I evaluated your scenario/ case a bit using your project. I observed the issue but not sure if it is an issue with the product or expected behavior. Using Cell.HtmlString attribute for the cell content in A2 from your provided Text.xlsx file, I found some HTML tags like Br etc. are missing in the output HTML string obtained. I used your sample code after updating it a bit:
e.g
Sample code:

Workbook wb = new Workbook("e:\\test2\\Text.xlsx");
Worksheet worksheet = wb.Worksheets[0];
Cell cell = worksheet.Cells[1,0];
string celltxt = cell.HtmlString.ToString();

//Clear existing stuff from response
Response.Clear();
Response.ClearContent();
Response.ClearHeaders();

//Set response type
Response.ContentType = "text/plain";

//Write the message
Response.Write(celltxt);
//End the response causing it to be sent
Response.End();


If I save an html file based on the "celltxt", I got the issue, the "Br" tags are missing in the output, Please see the screen shot attached here:

We need to look into it if the missing Br tags can be inserted into the html string or it is expected behavior. I have logged a ticket with an id "CELLSNET-43216" for your issue. We will look into it soon.

Once we have any update on it, we will let you know here.

Thank you.

Hi,

Thanks for your using Aspose.Cells.

Please download and try the latest fix: Aspose.Cells for .NET v8.3.0.4 and let us know your feedback.

The issues you have found earlier (filed as CELLSNET-43216) have been fixed in this update.


This message was posted using Notification2Forum from Downloads module by Aspose Notifier.

Hi Amjad Sahi


Thanks For Providing the Fix to handle Enter Spaces . But I am still having issue with the indentation of Bullet Points as Space Displayed before the Bullet Point is still not displayed even when I have used the latest DLL of Aspose For .NET 8.3.0.4 . Please Find the Attached Snapshot that displays that space displayed before the Bullet Point is displayed in the Excel Sheet But Not Displayed when I run the sample project which I provided you earlier with the latest DLL of Aspose you provided .

Please Find the Attached Excel Sheet to have a look at the Indentation of Bullets and also have a look at the attached snapshot that displays how the indentation of Bullets is rendered .

The Sample Code which I have used is as Follows :

Workbook wb = new Workbook(“C:\Aspose Folder\Text.xlsx”);
Worksheet worksheet = wb.Worksheets[0];
Cell cell = worksheet.Cells[0,0];
string celltxt = cell.HtmlString.ToString();
Response.Clear();
Response.ClearContent();
Response.ClearHeaders();
Response.ContentType = “text/HTML”;
Response.Write(celltxt);
Response.End();

Thanks
Rishi


Hi,


Thanks for providing us details, sample code and screen shot.

After an initial test, I observed the issue as you mentioned by using the following sample code with your newly attached file. I found, the Enter space and indentation of bullets are not rendered fine in the output HTML string, see the screen shot attached here:
e.g
Sample code:


Workbook wb = new Workbook(“e:\test2\Text.xlsx”);
Worksheet worksheet = wb.Worksheets[0];
Cell cell = worksheet.Cells[0,0];
string celltxt = cell.HtmlString.ToString();

//Clear existing stuff from response
Response.Clear();
Response.ClearContent();
Response.ClearHeaders();

//Set response type
Response.ContentType = “text/plain”;

//Write the message
Response.Write(celltxt);
//End the response causing it to be sent
Response.End();

// Response.Write(celltxt);

Label1.Text = celltxt;

If I save the celltxt to html file, the output is not right as per your screen shot.

I have logged a ticket with an id “CELLSNET-43252” for your issue. We will look into it soon.

Once we have any update on it, we will let you know here.

Thank you.

Hi,

Thanks for your using Aspose.Cells.

We have fixed this issue.

  • CELLSNET-43252 - Cell.HtmlString - Enter space and indentation of bullets are not rendered fine in the output HTML string

Please download and try the latest fix: Aspose.Cells for .NET v8.3.1.2 and let us know your feedback.

The issues you have found earlier (filed as CELLSNET-43252) have been fixed in this update.


This message was posted using Notification2Forum from Downloads module by Aspose Notifier.