Comments (11)
Sample data attached.
I hope this will be useful to you.
from nanoxlsx.
Thanks for fixing it.
The new version works correctly.
If I find any problems, I will report them.
from nanoxlsx.
My guess is that we can just ignore the rPH
tag.
from nanoxlsx.
こんいちは
Thank you for the report.
So, have I understood the issue correct:
The Furigana part above the Kana should never be visible in Excel. But it should be preserved when you copy the value of a cell to a program that handle Furigana?
I am asking because, when we ignore, rPh, the Furigana signs will be lost.
I will have a look into the formatting in the shared string table. This (inline formatting) is on top of my backlog as ToDo.
Thank you in advance for clarification.
from nanoxlsx.
Yes, Excel does not display the furigana part.
I have been using files containing Japanese for over 10 years and have never needed furigana.
Even when I edit files in Excel for the web, the furigana is lost.
Therefore, my conclusion is that there is no problem with lost furigana.
For a program to preserve the furigana, you generally need a different object model than a single value.
VBA provides Characters.PhoneticCharacters.
from nanoxlsx.
OK, thank you.
When I implemented the shared string table, I decided to remove all paragraphs and to keep all enclosed text, to preserve any content. However, since Furigana is only a Kanji transcription, it's presence breaks the sentence / word structure ,as you already stated.
Let me look for the best solution to preserve formatted text and to remove transcriptions. I have analyze the rPH (and possible others) tag a little bit. Maybe it can always be ignored or there will be an import option, if there are use cases, where rPH content is meaningful.
Please give me some time to do this. Currently, I am working on a big refactoring (dev branch) and I have to adapt any change on several braches and projects.
どうもありがとうございました。
from nanoxlsx.
I have some good news.
The rPH tag seems to be designated only for transcriptions (as Furigana is) of Han-originated characters. So it can be removed from the original text without side-effects.
I will do this by default with an opt-in import-option to keep the transcriptions, enclosed in brackets, if wished.
Please give me some days to implement and test this feature.
from nanoxlsx.
Hello
Technically, I already have a solution.
However. I have insufficient test data. And it looks like my western Office refuses to carry Furigana at all. I tried to copy-paste from a web browser and Word, but Excel never created a rPH tag.
Could you provide me with some additional samples, where Kanji characters are transcribed by Furigana? I would suggest something like that:
お元気ですか
--> Two connected Kanji surrounded by Hiraganaこの所は賑やかです。
--> Two disconnected Kanji, surrounded by Hiragana金
--> One single Kanji富士山は高いです。
--> Several Kanji at the beginning of the text and Hiragana at the endこの儘
--> Hiragana with Kanji at the end of the text
If you could provide me an Excel file with these (or similar) use cases, I could test my patch properly. Currently, I cannot predict the right tag structure.
Thank you very much in advance.
from nanoxlsx.
Thank you for your quick response.
We will gladly provide sample data. Please wait a moment.
from nanoxlsx.
ただいま
Thank you for the samples. They helped me a lot.
I just released v1.8.6. The Nuget packet will be available in some minutes.
by default, Furigana will now be discarded. If the transcription is wished, there is an import option "EnforcePhoneticCharacterImport", that can be set to true. In this case, Furigana will be appended to the Kanji characters:
Default | With Import Option |
---|---|
お元気ですか | お元気(ゲンキ)ですか |
この所は賑やかです | この所(トコロ)は賑(ニギ)やかです |
金 | 金(カネ) |
富士山は高いです。 | 富士山(フジサン)は高(タカ)いです。 |
この儘 | この儘(ママ) |
Please let me know if something is not working as expected.
また、レポートありがとうございました。
from nanoxlsx.
I will close this issue for now. If you try out the fix and find something that is not as you would expecting, please do not hesitate to re-open or file a new issue.
Thank you
from nanoxlsx.
Related Issues (20)
- Impossible to open xlsx create from Excel HOT 15
- Can't open Excel with custom cell style HOT 8
- Load modify and save file fails on network addresses HOT 7
- Set cell value HOT 4
- Attempting to freeze the first row of the spreadsheet HOT 4
- Content corrupted on Worksheet rename HOT 6
- Is it possible to add Data Validations? HOT 6
- AddNextCell incremental HOT 7
- Image support HOT 1
- Read large xlsx files HOT 1
- Multiple selections causing FormatException: The cell range () is malformed and could not be resolved HOT 5
- Protected worksheet causes System.FormatException: Input string was not in a correct format HOT 6
- CustomFormatCode HOT 1
- CustomFormatCode - Backslash to escape special format characters HOT 5
- Add hyperlink to cell HOT 2
- Chartsheet break the reader HOT 4
- vb.net inport into datagridview HOT 3
- Add Strong name signing HOT 3
- Fill.ValidateColor(): misleading exception message HOT 3
- Numbers are rounded when they shouldn't be HOT 6
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 nanoxlsx.