将Grid中的数据加载到Excel文件中

cym40011 2004-12-18 03:22:21
bcp select * from tblItem
queryout 'c:\1.xlt'

服务器: 消息 170,级别 15,状态 1,行 2
Line 2: Incorrect syntax near 'c:\1.xlt'.

请问SQL语句中 \ 的转义符号是什么啊?谢谢了。在线等


...全文
102 3 打赏 收藏 转发到动态 举报
写回复
用AI写文章
3 条回复
切换为时间正序
请发表友善的回复…
发表回复
cymxiao 2005-01-26
  • 打赏
  • 举报
回复
经过实践,bcp select * from tblItem
queryout 'c:\1.xlt'
是不好使用的。

下面是一段代码:
将Grid中的数据加载到Excel文件中

//**********************************将整个页面内容导出到Excel中
// Response.Clear();
// Response.Buffer= true;
// Response.Charset="GB2312";
// Response.AppendHeader("Content-Disposition","attachment;filename=FileName.xls");
// Response.ContentEncoding=System.Text.Encoding.GetEncoding("GB2312");//设置输出流为简体中文
// Response.ContentType = "application/ms-excel";//设置输出文件类型为excel文件。
cym40011 2005-01-26
  • 打赏
  • 举报
回复
经过实践,bcp select * from tblItem
queryout 'c:\1.xlt'
是不好使用的。

下面是一段代码:
将Grid中的数据加载到Excel文件中

//**********************************将整个页面内容导出到Excel中
// Response.Clear();
// Response.Buffer= true;
// Response.Charset="GB2312";
// Response.AppendHeader("Content-Disposition","attachment;filename=FileName.xls");
// Response.ContentEncoding=System.Text.Encoding.GetEncoding("GB2312");//设置输出流为简体中文
// Response.ContentType = "application/ms-excel";//设置输出文件类型为excel文件。
yangzhenhai 2004-12-25
  • 打赏
  • 举报
回复
\\

5,139

社区成员

发帖
与我相关
我的任务
社区描述
其他开发语言 Office开发/ VBA
社区管理员
  • Office开发/ VBA社区
加入社区
  • 近7日
  • 近30日
  • 至今
社区公告
暂无公告

试试用AI创作助手写篇文章吧