我初学mapinfo10,讲txt文件导入后,转换为tab文件,但是tab文件只有1k,而且不可编辑,怎么办

我试过另存tab副本,但是还是只有1k,求助啊... 我试过另存tab副本,但是还是只有1k,求助啊 展开
 我来答
072jncgnt
2011-06-04 · TA获得超过2310个赞
知道大有可为答主
回答量:4534
采纳率:0%
帮助的人:860万
展开全部
另存成mapinfo自己的格式就可以修改了。
mapbasic写excel数据,需要用DDE相关的命令。自己在帮助里面找关键词。

下面是 Example

Dim chan_num, tab_marker As Integer
Dim topiclist, topicname, cell As String

chan_num = DDEInitiate("EXCEL", "System")
If chan_num = 0 Then
Note "Excel is not responding."
End Program
End If

' Get a list of Excel's valid topics
topiclist = DDERequest$(chan_num, "topics")

' Topics in the list are separated by tabs.
' If Excel 4 is running, topiclist might look like:
' ": Sheet1 System"
' (if spreadsheet is still "unnamed"),or like:

' ": C:Orders.XLS Sheet1 System"
'
' If Excel 5 is running, topiclist might look like:
' "[Book1]Sheet1 [Book2]Sheet2 ..."
'
' Next,extract just the first topic (e.g."Sheet1")
' by extracting the text between the 1st & 2nd tabs;
' or, in the case of Excel 5, by extracting the text
' that appears before the first tab.

If Left$(topiclist, 1) = ":" Then
' ...then it's Excel 4.
tab_marker = InStr(3, topiclist, Chr$(9) )
If tab_marker = 0 Then

Note "No Excel documents in use! Stopping."
End Program
End If
topicname = Mid$(topiclist, 3, tab_marker - 3)
Else
' ... assume it's Excel 5.
tab_marker = Instr(1, topiclist, Chr$(9) )
topicname = Left$( topiclist, tab_marker - 1)
End If

' open a channel to the specific document
' (e.g. "Sheet1")
DDETerminate chan_num
chan_num = DDEInitiate("Excel", topicname)
If chan_num = 0 Then
Note "Problem communicating with " + topicname

End Program
End If

' Let's examine the 1st cell in Excel.
' If cell is blank, put a message in the cell.
' If cell isn't blank, don't alter it -
' just display cell contents in a MapBasic NOTE.
' Note that a "Blank cell" gets returned as a
' carriage-return line-feed sequence:
' Chr$(13) + Chr$(10).
cell = DDERequest$( chan_num, "R1C1" )
If cell <> Chr$(13) + Chr$(10) Then
Note
"Message not sent; cell already contains:" + cell
Else
DDEPoke chan_num, "R1C1", "Hello from MapInfo!"

Note "Message sent to Excel,"+topicname+ ",R1C1."
End If
DDETerminateAll
追问
我就是想问如何转换成mapinfo自己的数据啊,我文件菜单的“保存表”是暗的,“另存副本为”可选,但是另存后还是只有1k,怎么办
本回答被提问者采纳
已赞过 已踩过<
你对这个回答的评价是?
评论 收起
hehy826
2011-06-13
知道答主
回答量:20
采纳率:0%
帮助的人:16.3万
展开全部
是TXT文件?TXT转过去有用吗
已赞过 已踩过<
你对这个回答的评价是?
评论 收起
手机用户16335
2011-06-04
知道答主
回答量:14
采纳率:0%
帮助的人:0
展开全部
转换时看看默认的保存路径是在什么地方
已赞过 已踩过<
你对这个回答的评价是?
评论 收起
收起 2条折叠回答
推荐律师服务: 若未解决您的问题,请您详细描述您的问题,通过百度律临进行免费专业咨询

为你推荐:

下载百度知道APP,抢鲜体验
使用百度知道APP,立即抢鲜体验。你的手机镜头里或许有别人想知道的答案。
扫描二维码下载
×

类别

我们会通过消息、邮箱等方式尽快将举报结果通知您。

说明

0/200

提交
取消

辅 助

模 式