litianyang 发表于 2020-5-7 18:15:43

C#里面插入图片

static void Main()
      {
            // 生成电子文件
            string filePath = "C:\\公文.docx";
            StreamWriter sw = File.CreateText(filePath);
            sw.Write("西安");
            sw.Close();
我想往里面 加一张图片代码怎么写

永恒的蓝色梦想 发表于 2020-5-7 18:30:39

据我所知,StreamWrite 不能正确的写入 docx,写入后打开会报错

xiaosi4081 发表于 2020-5-7 18:35:19

https://blog.csdn.net/qq_40741855/article/details/80978352

一世长安呢 发表于 2020-5-7 19:15:47

StreamWriter 好像不能操作word那些东西,
https://jingyan.baidu.com/article/6b97984dfaa94c1ca2b0bffc.html
页: [1]
查看完整版本: C#里面插入图片