![]() |
|
|
Регистрация Восстановить пароль |
Регистрация | Задать вопрос |
Заплачу за решение |
Новые сообщения |
Сообщения за день |
Расширенный поиск |
Правила |
Всё прочитано |
![]() |
|
|
Опции темы | Поиск в этой теме |
![]() |
#11 |
Пользователь
Регистрация: 30.05.2011
Сообщений: 10
|
![]()
Для вот этого макроса необходимо установить связь с документом Exel.
Код:
Для моего случая наверно надо использовать первый вариант. Подскажите как правильно это сделать. Я пробовал у меня не получилось. Connection strings for Excel 2007 (ACE OLEDB 12.0) Type: OLE DB Provider Usage: Provider=Microsoft.ACE.OLEDB.12.0 Xlsx files This one is for connecting to Excel 2007 files with the Xlsx file extension. That is the Office Open XML format with macros disabled. Код:
Treating data as text Use this one when you want to treat all data in the file as text, overriding Excels column type "General" to guess what type of data is in the column. Код:
the column data is numeric, use IMEX=1 to avoid crash. To always use IMEX=1 is a safer way to retrieve data for mixed data columns. Consider the scenario that one Excel file might work fine cause that file's data causes the driver to guess one data type while another file, containing other data, causes the driver to guess another data type. This can cause your app to crash. Xlsb files This one is for connecting to Excel 2007 files with the Xlsb file extension. That is the Office Open XML format saved in a binary format. I e the structure is similar but it's not saved in a text readable format as the Xlsx files and can improve performance if the file contains a lot of data. Код:
"HDR=Yes;" indicates that the first row contains columnnames, not data. "HDR=No;" indicates the opposite. Xlsm files This one is for connecting to Excel 2007 files with the Xlsm file extension. That is the Office Open XML format with macros enabled. Код:
The quota " in the string needs to be escaped using your language specific escape syntax. c#, c++ \" VB6, VBScript "" xml (web.config etc) " or maybe use a single quota '. "HDR=Yes;" indicates that the first row contains columnnames, not data. "HDR=No;" indicates the opposite. |
![]() |
![]() |
![]() |
#12 |
Старожил
Регистрация: 02.05.2009
Сообщений: 3,907
|
![]()
Зачем вам каждый раз дергать файлы базы.
Смотрите вложение.все работает как хотите Порядок отрытия файлов тот же
Анализ,обработка данных Недорого
|
![]() |
![]() |
![]() |
#13 |
Пользователь
Регистрация: 30.05.2011
Сообщений: 10
|
![]()
Ура он работает
![]() ![]() ![]() ![]() ![]() наверно надо внести изменения в цикле поиска слов? Когда вот такой текст, то макрос не работает. ААА.rar Последний раз редактировалось rikomono; 01.06.2011 в 20:13. |
![]() |
![]() |
![]() |
|
![]() |
||||
Тема | Автор | Раздел | Ответов | Последнее сообщение |
Запрос к базе данных на HQL | fearchik | Java Базы данных (JDBC, JPA, Hibernate) | 0 | 30.04.2011 21:01 |
Запрос к базе данных | nec117 | PHP | 0 | 09.03.2011 17:40 |
sql запрос к базе | sashonk | SQL, базы данных | 8 | 01.09.2010 11:11 |
как правельно составить запрос к базе данных? не могу найти ошибку... | Человек_Борща | SQL, базы данных | 6 | 27.02.2010 17:22 |
Запрос к базе данных Table | A-1_S | БД в Delphi | 10 | 03.09.2009 21:14 |