1
A
回答
2
我发现您可以通过使用Open Office来实现此目的。从他们你可以定义你自己的分隔符和周围的角色。
以CSV格式保存/导出时,请选中定义我自己的字符的方框。
4
您可以从Excel中使用过宏观appropiate像这样使用:
Sub QuoteCommaExport()
' Dimension all variables.
Dim DestFile As String
Dim FileNum As Integer
Dim ColumnCount As Integer
Dim RowCount As Integer
' Prompt user for destination file name.
DestFile = InputBox("Enter the destination filename" & Chr(10) & "(with complete path):", "Quote-Comma Exporter")
' Obtain next free file handle number.
FileNum = FreeFile()
' Turn error checking off.
On Error Resume Next
' Attempt to open destination file for output.
Open DestFile For Output As #FileNum
' If an error occurs report it and end.
If Err <> 0 Then
MsgBox "Cannot open filename " & DestFile
End
End If
' Turn error checking on.
On Error GoTo 0
' Loop for each row in selection.
For RowCount = 1 To Selection.Rows.Count
' Loop for each column in selection.
For ColumnCount = 1 To Selection.Columns.Count
' Write current cell's text to file with quotation marks.
Print #FileNum, """" & Selection.Cells(RowCount, ColumnCount).Text & """";
' Check if cell is in last column.
If ColumnCount = Selection.Columns.Count Then
' If so, then write a blank line.
Print #FileNum,
Else
' Otherwise, write a comma.
Print #FileNum, ";";
End If
' Start next iteration of ColumnCount loop.
Next ColumnCount
' Start next iteration of RowCount loop.
Next RowCount
' Close destination file.
Close #FileNum
End Sub
相关问题
- 1. 谷歌文档:无法导出/ Python中
- 2. 用双引号括起来的csv文件不剥去引号
- 3. 导出双值CSV
- 4. 谷歌应用程序脚本导出和替换CSV文件
- 5. 双引号中使用双引号
- 6. 通过SSIS包导入.csv文件不带双引号
- 7. 批量导入CSV文件到SQL Server中 - 删除双引号
- 8. 导出Excel文件或谷歌文档在Android
- 9. 更改文档的名称使用谷歌脚本文件导出
- 10. 是否有理由不在CSV文件中使用双引号?
- 11. 弹出框与链接到其他谷歌文档在谷歌文档
- 12. 从谷歌文档
- 13. CSV忽略逗号双引号
- 14. StringBuilder导出csv带有引号
- 15. MySQL导出CSV不带引号
- 16. 使用双引号
- 17. 导出谷歌日历与使用GAS
- 18. 在bash导出语句中使用双引号
- 19. 为什么我会在Scriptella上输出CSV文件的双重双引号?
- 20. 将文档导出为JSON或CSV
- 21. 将Mongodb子文档导出为CSV
- 22. 使用单引号或双引号
- 23. 用双引号取代双引号
- 24. 谷歌应用程序引擎:导入导出blobstore
- 25. read.csv无法读取从谷歌文档的CSV文件
- 26. 谷歌文档API - 上传XML文档
- 27. 无法检索文档在谷歌文档中使用c#
- 28. 用谷歌应用引擎上传和解析csv文件
- 29. 使用双引号写MIME文件
- 30. 如何在导入CSV文件时去除文本周围的双引号?
CSV只需要值被包裹在引号当值包含逗号。为什么你需要用引号括起所有的值?你在编写自己的CSV解析器吗? – adamleerich
红宝石似乎不按规则在这里玩。 – bmargulies