首页 诗词 字典 板报 句子 名言 友答 励志 学校 网站地图
当前位置: 首页 > 教程频道 > 其他教程 > 操作系统 >

日文操作系统上,读取日文Excel中的中文后保存到文本文件

2014-04-20 
日文操作系统下,读取日文Excel中的中文后保存到文本文件+++++++++++++++++++++++++++++++++++++ Get out

日文操作系统下,读取日文Excel中的中文后保存到文本文件

'+++++++++++++++++++++++++++++++++++++' Get output object' Return output object' eg.'     Dim wo as object'     Call GetWriteObject(wo)'+++++++++++++++++++++++++++++++++++++Function GetWriteObject(ByRef TextStream As Object)    Set TextStream = CreateObject("ADODB.Stream")    With TextStream        .Mode = 3        .Open        .CharSet = "UTF-8"        .Position = TextStream.Size    End WithEnd Function'+++++++++++++++++++++++++++++++++++++' Write content to object' eg.'     Dim wo as object'     Call GetWriteObject(wo)'     strA = "This is sample."'     writeContent(strA, wo)'+++++++++++++++++++++++++++++++++++++Function WriteContent(ByVal strContent As String, ByRef TextStream As Object)    TextStream.WriteText strContentEnd Function'+++++++++++++++++++++++++++++++++++++' Write content to file' eg.'     Dim wo as object'     Call GetWriteObject(wo)'     strA = "This is sample."'     writeContent(strA, wo)'     WriteFile(strPath, wo)'+++++++++++++++++++++++++++++++++++++Function WriteFile(ByVal strFilename As String, ByRef TextStream As Object, Optional ByVal adSaveCreateOverWrite As String = "2")    TextStream.SaveToFile strFilename, adSaveCreateOverWrite    TextStream.CloseEnd Function

?

读取成UTF-8,并以UTF-8编码写入文本文件

热点排行