Comments (17)
@erayaydin @rainabba I have finally found the solutions after trying everything I could. In the table2excel.js file at line 29, where the head is defined for e.template, I added this meta tag:
<meta http-equiv=\"content-type\" content=\"application/vnd.ms-excel; charset=UTF-8\">
right before the
<head>
tag
from jquery-table2excel.
It definitely sounds like a unicode issue and I'm guessing that the html entity/escaped character (like ® or ®) doesn't work in Excel the same as in the browser and if that's the case, there's nothing I can do here. If you can copy/paste, then there's some hope, but the issue will likely be something I cannot support.
Can you copy/paste those same characters directly from the browser into Excel?
from jquery-table2excel.
Hi @rainabba,
About @erayaydin's issue, I'm having the same problem. base64 decoding for Turkish characters such as "İ,ı,Ğ,ğ,ş,ç,ö..." doesn't work properly. ( it encodes those characters into some weird set of symbols. ) How can we add a custom character replacing function to our table2exe.js file? Or is there any suggestion that you can give to solve this problem? (I think what we need to enhance is around line 60 in the file. But I might very well be wrong beacuse I'm only a beginner in jQuery.)
from jquery-table2excel.
If you can confirm whether or not you can copy/paste those characters from the browser into Excel, then I'll better know what options might be available. My instinct says that something should be available to address this since multi-language unicode characters are common, but it's also not an area I have any real experience with in JS.
I wonder if this hints at the issue and possible solutions: http://stackoverflow.com/questions/60825/international-characters-in-javascript
from jquery-table2excel.
Copying from browser to Excel is NOT the issue. Since Excel and all other office programs have Turkish language support, you can write those character directly to Excell, or copy/paste from anywhere. Here is a picture that shows characters are fine with Excel.
from jquery-table2excel.
Thanks for the suggestion ferman2147. I just setup a rainabba-patch-utf8 branch but can't test yet so I created a pull request. If someone wants to try that branch and report back, I can commit to master quickly otherwise I will test when I can and commit then.
By the way, can I ask where you guys found out about my plugin? Suddenly it seems very popular :)
from jquery-table2excel.
I tried manually (not branch) and its working!
from jquery-table2excel.
Well, I'm working on a web based CRM for a company and they make quotation forms for customers, and they want it in excel. To this point, it's all great. I make them fill a contenteditable table, and when they are finished they click on a button and magic! Excel is ready thanks to your plugin. But now they wanna view those excel forms (which they upload and store each URL in database) online when needed. That's where things go south for me :) I can't get the excel files created by your plugin to be readable. But I appreaciate your work. It's very useful.
from jquery-table2excel.
I have tested @ferman2147's suggestion and it works perfectly. Definitely a good suggestion for merging to master.
Also I Googled 'Excel export' and found this. This subsequently lead to here 👍
from jquery-table2excel.
@ferman2147 I have tried your hint but it didn't work.
In the table2excel I have :
e.template = {
head: "<html xmlns:o=\"urn:schemas-microsoft-com:office:office\" xmlns:x=\"urn:schemas-microsoft-com:office:excel\" xmlns=\"http://www.w3.org/TR/REC-html40\"><head><!--[if gte mso 9]><xml><x:ExcelWorkbook><x:ExcelWorksheets>",
sheet: {
head: "<x:ExcelWorksheet><x:Name>",
tail: "</x:Name><x:WorksheetOptions><x:DisplayGridlines/></x:WorksheetOptions></x:ExcelWorksheet>"
},
mid: "</x:ExcelWorksheets></x:ExcelWorkbook></xml><![endif]--></head><body>",
table: {
head: "<table>",
tail: "</table>"
},
foot: "</body></html>"
};
And just below the head tag, I added the line that you said, but it didn't work.
Thanks in advance.
from jquery-table2excel.
@ferman2147 Thanks, it's worked in Chinese Charactor!
from jquery-table2excel.
@ferman2147 Thank you bro
from jquery-table2excel.
@ferman2147 It works in Chinese! Thank you!
from jquery-table2excel.
You're welcome guys.
@ignacio-chiazzo I'm sorry I haven't been around for a long time. In case you might still need help, I edited my comment, it's clearer now. You should add that above head tag, not below. I mean right before it, because above and below terms will need line break tweaks. Let's stick with "right before" :)
from jquery-table2excel.
@ferman2147 a tag works perfect. Thanks, man!
from jquery-table2excel.
This doesn't work for me. I can copy russian language text to excel but when i export russian text it doesn't work.
I added below line before tag and even tried after tag as well but that doesn't work for me. See text "PASTED_MY_LINE_HERE" i replaced this text with below line.
"<meta http-equiv="content-type" content="application/vnd.ms-excel; charset=UTF-8">";
e.template = {
head: "<html xmlns:o="urn:schemas-microsoft-com:office:office" xmlns:x="urn:schemas-microsoft-com:office:excel" xmlns="http://www.w3.org/TR/REC-html40\">PASTED_MY_LINE_HERE ",
table: {
head: "
tail: "
},
foot: ""
};
Please advice.
from jquery-table2excel.
@ferman2147 it's working. I tried to complete it, Thank you
from jquery-table2excel.
Related Issues (20)
- Planning an update to this project HOT 1
- Problem using this plugin combined with SharePoint Framework
- Css doesn't work HOT 1
- Not An Issue - But Your Plugin Is Much More Efficient Than TableExport HOT 1
- when table content having phone no then excel sheet don't show it properly HOT 1
- 消除科学计数 HOT 1
- Doesn't export no error messages
- Can this plugin do AutoFilter (in spreadsheet)? HOT 1
- Issue with tags and bower HOT 2
- [display: none;] <- it had no effect.????? HOT 2
- Style not work in libreoffice
- How put 2 tables in line?
- xlsx file creation HOT 2
- Export table with pagination HOT 2
- Apply cell format to 'Text' HOT 2
- the format does not match the extension (office) HOT 2
- Nested Table issue
- How to export select rows,no unselected columns!
- can this plugin export excel with "border"?
- Uncaught SyntaxError: expected expression, got '<' HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from jquery-table2excel.