VTable icon indicating copy to clipboard operation
VTable copied to clipboard

[Bug]冻结列数据后 导出excel表格,出现滚动问题

Open lak110110 opened this issue 1 year ago • 5 comments

Version

1.60

Link to Minimal Reproduction

暂无,本地运行

Steps to Reproduce

图片 导出excel数据表

Current Behavior

[Bug]冻结列数据后 导出excel表格,出现滚动问题,拖动右下滚动条,多余的数据则会在图的左侧小部分区域滚动

Expected Behavior

希望多出的数据,能正常滚动

Environment

- OS:win11
- Browser:edge
- Framework:electron

Any additional comments?

No response

lak110110 avatar Aug 19 '24 12:08 lak110110

请提供一下复现option

Rui-Sun avatar Aug 26 '24 09:08 Rui-Sun

就是你们官方的例子,也会出现这种问题, let tableInstance; fetch('https://lf9-dp-fe-cms-tos.byteorg.com/obj/bit-cloud/VTable/North_American_Superstore_Pivot_data.json') .then(res => res.json()) .then(data => { const option = { records: data, rows: [ { dimensionKey: 'City', title: 'City', headerStyle: { textStick: true }, width: 'auto' } ], columns: [ { dimensionKey: 'Category', title: 'Category', headerStyle: { textStick: true }, width: 'auto' } ], indicators: [ { indicatorKey: 'Quantity', title: 'Quantity', width: 'auto', showSort: false, headerStyle: { fontWeight: 'normal' }, style: { padding: [16, 28, 16, 28], color(args) { if (args.dataValue >= 0) return '#000000'; return 'red'; } } }, { indicatorKey: 'Sales', title: 'Sales', width: 'auto', showSort: false, headerStyle: { fontWeight: 'normal' }, format: rec => { return '$' + Number(rec).toFixed(2); }, style: { padding: [16, 28, 16, 28], color(args) { if (args.dataValue >= 0) return '#000000'; return 'red'; } } }, { indicatorKey: 'Profit', title: 'Profit', width: 'auto', showSort: false, headerStyle: { fontWeight: 'normal' }, format: rec => { return '$' + Number(rec).toFixed(2); }, style: { padding: [16, 28, 16, 28], color(args) { if (args.dataValue >= 0) return '#000000'; return 'red'; } } } ], corner: { titleOnDimension: 'row', headerStyle: { textStick: true } }, dataConfig: { sortRules: [ { sortField: 'Category', sortBy: ['Office Supplies', 'Technology', 'Furniture'] } ] }, widthMode: 'standard' }; tableInstance = new VTable.PivotTable(document.getElementById(CONTAINER_ID), option); window['tableInstance'] = tableInstance;

bindExport();

});

function bindExport() { let exportContainer = document.getElementById('export-buttom'); if (exportContainer) { exportContainer.parentElement.removeChild(exportContainer); }

exportContainer = document.createElement('div'); exportContainer.id = 'export-buttom'; exportContainer.style.position = 'absolute'; exportContainer.style.bottom = '0'; exportContainer.style.right = '0';

window['tableInstance'].getContainer().appendChild(exportContainer);

const exportCsvButton = document.createElement('button'); exportCsvButton.innerHTML = 'CSV-export'; const exportExcelButton = document.createElement('button'); exportExcelButton.innerHTML = 'Excel-export'; exportContainer.appendChild(exportCsvButton); exportContainer.appendChild(exportExcelButton);

exportCsvButton.addEventListener('click', () => { if (window.tableInstance) { downloadCsv(exportVTableToCsv(window.tableInstance), 'export'); } });

exportExcelButton.addEventListener('click', async () => { if (window.tableInstance) { downloadExcel(await exportVTableToExcel(window.tableInstance), 'export'); } }); }

请提供一下复现option

lak110110 avatar Sep 07 '24 10:09 lak110110

20240911154536_rec_ 没有复现这个问题

Rui-Sun avatar Sep 11 '24 07:09 Rui-Sun

官方的这个例子导出的文件在mac电脑上用Excel打开没有问题,但是在windows电脑上用Excel打开就会出现冻结列异常的问题 图片 图片

xiejun avatar Oct 23 '24 03:10 xiejun

同遇到

Image

TheTimeMachine avatar Mar 19 '25 08:03 TheTimeMachine

同样在windows下会出现该问题

momentV avatar Jul 10 '25 06:07 momentV