如何实现将image中图片保存到excel和word文件中?

解决方案 »

  1.   

    路过,我只有C#版的:
    http://expert.csdn.net/Expert/topic/1385/1385328.xml?temp=.4182093protected void getPhoto(string personId,ref PTSWord.Range range)
    {
    object LinkToFile = false,SaveWithDocument = true;
    object Range = System.Reflection.Missing.Value;
    PTSWord.InlineShape inLineShape;
    String fileName = String.Empty;
    fileName = PhotoPath + "\\" + personId + ".jpg";
    try
    {
    range.Text = "";
    inLineShape = range.InlineShapes.AddPicture(fileName,ref LinkToFile,ref SaveWithDocument,ref Range);
    inLineShape.Width = 80;
    inLineShape.Height = 103;

    }
    catch(Exception e)
    {
    Console.WriteLine(e.Message);
    this.IsExit = true;
    }
    return ;
    }