import XLSX from 'xlsx';

const filePath = 'D:\\MyCursor\\AIclinicalresearch\\docs\\03-业务模块\\ASL-AI智能文献\\05-测试文档\\03-测试数据\\screening\\Test Cases.xlsx';

const workbook = XLSX.readFile(filePath);
const sheetName = workbook.SheetNames[0];
const worksheet = workbook.Sheets[sheetName];
const data = XLSX.utils.sheet_to_json(worksheet);

console.log(`总行数: ${data.length}`);
console.log('\n前3行数据:');
data.slice(0, 3).forEach((row: any, i) => {
  console.log(`\n第${i+1}行:`);
  console.log(JSON.stringify(row, null, 2));
});

console.log('\n所有列名:');
if (data.length > 0) {
  console.log(Object.keys(data[0]));
}







