Слияние Excel Files Into One

Попробуйте это. Он перебирает все элементы div и проверяет их text, используя textContent. Если он соответствует, он заменяет текст тегом изображения, используя innerHTML

var a = document.querySelectorAll('div');
a.forEach((e) => {
  if (e.textContent == "abc")
    e.innerHTML = "<img src='example123.com'>"
 if(e.textContent == "def")
    e.innerHTML = "<img src='anotherexample.com'>"
})
[ 111]

8
задан Juliet 6 May 2009 в 17:49
поделиться

5 ответов

You'll need to use the Microsoft Excel Interop library. http://msdn.microsoft.com/en-us/library/microsoft.office.interop.excel.aspx

You should be able to add a reference, in the com tab, to Microsoft Excel 11 Object Library.

http://msdn.microsoft.com/en-us/library/ms173186(VS.80).aspx

2
ответ дан 6 December 2019 в 01:40
поделиться

Look into Visual Studio Tools for Office (VSTO).
You can open workbooks in code and use a lot of the excel functionality, as well as copying worksheets like you've said you need to do.

For resources, this MSDN forum post demonstrates opening excel files and copying worksheets. Hopefully this will get you on the right direction.

0
ответ дан 6 December 2019 в 01:40
поделиться

Of course you can do Tool->Compare->Merge Workbooks. And within Excel as Joshua mentioned there is the merge method in the COM Interop libraries. If you need some help let me know I work heavily in Excel and may be able to help you out on a small fee basis.

-3
ответ дан 6 December 2019 в 01:40
поделиться

It's not free (a developer license is $ 425) but GemBox has a very good library that is way faster than using the office objects. We use it in my current project since a year and a half, and it has consistently performed very well for us.

1
ответ дан 6 December 2019 в 01:40
поделиться

Это простая задача для изящной маленькой программы под названием Bulk File Merger (у них есть версия для Mac под названием Excel File Merger). Мне удалось объединить более 300 файлов за считанные минуты. Вы также можете объединить файлы csv, что займет еще меньше времени. Мы обработали более 1300 файлов CSV за секунды. Страшно.

2
ответ дан 6 December 2019 в 01:40
поделиться
Другие вопросы по тегам:

Похожие вопросы: