⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 vc_excel_test.cpp

📁 实现 excel读取
💻 CPP
字号:
// 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 + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -