// C#
private void ListRecentFiles()
{
Excel.Range rng = (Excel.Range)ThisApplication.
get_Range("RecentFiles", Type.Missing).Cells[1, 1]; for (int i = 1; i <= ThisApplication.RecentFiles.Count; i++)
{
rng.get_Offset(i - 1, 0).Value2 =
ThisApplication.RecentFiles[i].Name;
}
}
private void ListRecentFiles()
{
Excel.Range rng = (Excel.Range)ThisApplication.
get_Range("RecentFiles", Type.Missing).Cells[1, 1]; for (int i = 1; i <= ThisApplication.RecentFiles.Count; i++)
{
rng.get_Offset(i - 1, 0).Value2 =
ThisApplication.RecentFiles[i].Name;
}
}
解决方案 »
- 请大家帮我看下是哪里出的错?
- Excel替换字符串问题
- 求教一段C++的代码,用C#怎么写
- 请教:MYSQL连接数据库查询数据出问题
- 老师今天给了判断题呵呵考考大家
- 高手进!帮帮我,谢谢(IE显示 .eml文件问题)。
- 好心的仁兄,帮忙看看这个报错,是什么意思,谢谢
- 在WinForm中如何实现MainMenu中的MenuItem动态新增加项中如何添加事件;有具体说明,在线等!!
- 高分求助:一段PHP利用CURL POST的代码如何用C#实现呢,求高手指点下
- 如何在picturebox中显示图片的缩略图?
- 请教怎样在代码里执行sql server的系统存储过程
- 菜鸟问:richTextBox.selectedText.Remove
public void EchoStringToCell(string str)
{
Excel.Worksheet sheet1 =
(Excel.Worksheet)this.ThisApplication.Sheets.get_Item(1);
((Excel.Range)sheet1.Cells[1,1]).Value2 = str;
}这是写excel,读自然就是string str = ((Excel.Range)sheet1.Cells[1,1]).Value2 ;