vc_excel_test.cpp
来自「实现 excel读取」· C++ 代码 · 共 33 行
CPP
33 行
// VC_EXCEL_test.cpp : Defines the entry point for the console application.
//
#include "stdafx.h"
#include "CSpreadSheet.h"
int main(int argc, char* argv[])
{
printf("Hello World!\n");
CSpreadSheet SS("Book2.xls", "Sheet1");
CStringArray Rows, Column;
//清空列表框
for (int i = 1; i <= SS.GetTotalRows(); i++)
{
// 读取一行
SS.ReadRow(Rows, i);
CString strContents = "";
for (int j = 1; j <= Rows.GetSize(); j++)
{
if(j == 1)
strContents = Rows.GetAt(j-1);
else
strContents = strContents + " --> " + Rows.GetAt(j-1);
}
}
return 0;
}
⌨️ 快捷键说明
复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?