单独的地址块:将一列变为 3 列
我有一个计算电子表格。有一些记录。有一个列包含以下信息
Ecole Saint-Exupery
Rue Saint-Malo 24
67544 Paris
那么我需要将这些行分成至少三列
name: Ecole Saint-Exupery
street: Rue Saint-Malo 24
postal code and town 67544 Paris
甚至更好 - 我已将邮政编码和城镇分成两个单独的列!? 问题:这可能吗?我可以(或应该)在 calc (打开文档格式)中执行此操作吗? 我是否需要使用正则表达式和 Perl 或者我可以在没有正则表达式的情况下解决这个问题吗?
注意 - 最后我需要将数据传输到 MySQL 数据库...
我期待着一个提示...
问候
顺便说一句:你可以看到现实世界中的所有内容 - 现场演示: http://192.68.214.70/km/asps /schulsuche.asp?q=a&a=50&s=1750 - 请参阅提交的
Schulname
Straße
PLZ Ort
这些字段包含三项内容 - 名称、街道、邮政编码和城镇! 问:这个可以分成几部分吗?如果您复制并粘贴信息 - 并将其放入计算中,那么您将仅在一个单元格中获得所有信息。如何将所有这些信息分成三个甚至四个单元格?
顺便说一句 - 我尝试将信息转换为十六进制代码 - 请参阅以下内容...:
Staatl. Realschule Grafenau
Rachelweg 20
94481 Grafenau
00000000: 53 74 61 61 74 6C 2E 20 52 65 61 6C 73 63 68 75
00000010: 6C 65 20 47 72 61 66 65 6E 61 75 20 0A 52 61 63
00000020: 68 65 6C 77 65 67 20 32 30 0A 39 34 34 38 31 20
00000030: 20 47 72 61 66 65 6E 61 75 20 20
但我不知道这是否有帮助!?
你能帮我解决这个问题吗?我需要一个正则表达式吗?
非常感谢您提供的任何帮助!
i have a spreadsheed in calc. with some records. There is a column that contains the following information
Ecole Saint-Exupery
Rue Saint-Malo 24
67544 Paris
Well i need to have those lines divided into at least three columns
name: Ecole Saint-Exupery
street: Rue Saint-Malo 24
postal code and town 67544 Paris
Or even better - i have divided the postal code and town into two seperate columns!?
Question: is this possible? Can (or should) i do this in calc (open document-formate)?
Do i need to have to use a regex and perl or am i able to solve this issues without an regex?
Note - finally i need to transfer the data into MySQL-database...
I look forward to a tipp...
greetings
BTW: you can see all the things in a real world-live-demo: http://192.68.214.70/km/asps/schulsuche.asp?q=a&a=50&s=1750 - see the filed
Schulname
Straße
PLZ Ort
These field contains three things - the name, the street and the Postal Code and the town!
Question: can this be divided into parts!? If you copy and paste the information - and drop it to calc then you get all the information in only one cell. How to divide and seperate all those information into three cells or even four?
BTW - i tried to translate the information to hex-code - see the follwoing...:
Staatl. Realschule Grafenau
Rachelweg 20
94481 Grafenau
00000000: 53 74 61 61 74 6C 2E 20 52 65 61 6C 73 63 68 75
00000010: 6C 65 20 47 72 61 66 65 6E 61 75 20 0A 52 61 63
00000020: 68 65 6C 77 65 67 20 32 30 0A 39 34 34 38 31 20
00000030: 20 47 72 61 66 65 6E 61 75 20 20
but i do not know if this helps here!??
Can you help me to solve the problem. Do i need to have a regex!?
Many thanks in advance for any and all help!
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
您可能不需要正则表达式。您应该能够获取相关单元格的内容并使用存在的换行符将其拆分。我对 calc 不熟悉,但如果有 split() 或explode() 函数返回一个数组,那么在换行符上分割将产生您正在寻找的 3 个部分。
You may not need a regex. You should be able to take the contents of the cell in question and split it up using the newline character that is present. I am not familiar with calc, but if there is a split() or explode() function that returns an array, then splitting on a newline will yield the 3 pieces you are looking for.