#0
by AF
Есть такой код... Признаемся честно, передрал из 7.7. Там все работает (единственно сменил "ПолучитьCOMОбъект") и в 8-ке почти работает, доходит до последней строки и огрызается: "{Форма.Форма}: Метод объекта не обнаружен (SaveAs) Application.SaveAs(ПутьКФайлу); " Что бы это значило? ПутьКФайлу="D: est";
#3
by Immortal
Application.ActiveWorkbook.SaveAs(ПутьКФайлу+".xls",-4143); а что там во втором параметре? p/s/ код лучш переписать..без ActiveWorkbook
#5
by AF
я не знаю... (вот это ответ!) Содрал эту фичу целиком... Работает и ладно... Юзверю ЛЕНЬ нажать "Сохранить как..." Свол... Лентяи!
#8
by Immortal
See AlsoApplies ToExampleSpecificsSaveAs method as it applies to the Chart and Worksheet objects. Saves changes to the chart or worksheet in a different file. expression.SaveAs(FileName, FileFormat, Password, WriteResPassword, ReadOnlyRecommended, CreateBackup, AddToMru, TextCodepage, TextVisualLayout, Local) expression Required. An expression that returns one of the above objects. Filename Optional Variant. A string that indicates the name of the file to be saved. You can include a full path; if you don't, Microsoft Excel saves the file in the current folder. FileFormat Optional Variant. The file format to use when you save the file. For a list of valid choices, see the FileFormat property. For an existing file, the default format is the last file format specified; for a new file, the default is the format of the version of Excel being used. Password Optional Variant. A case-sensitive string (no more than 15 characters) that indicates the protection password to be given to the file. WriteResPassword Optional Variant. A string that indicates the write-reservation password for this file. If a file is saved with the password and the password isn't supplied when the file is opened, the file is opened as read-only. ReadOnlyRecommended Optional Variant. True to display a message when the file is opened, recommending that the file be opened as read-only. CreateBackup Optional Variant. True to create a backup file. AddToMru Optional Variant. True to add this workbook to the list of recently used files. The default value is False. TextCodePage Optional Variant. Not used in U.S. English Microsoft Excel. TextVisualLayout Optional Variant. Not used in U.S. English Microsoft Excel. Local Optional Variant. True saves files against the language of Microsoft Excel (including control panel settings). False (default) saves files against the language of Visual Basic for Applications (VBA) (which is typically US English unless the VBA project where Workbooks.Open is run from is an old internationalized XL5/95 VBA project). SaveAs method as it applies to the Workbook object. Saves changes to the workbook in a different file. expression.SaveAs(FileName, FileFormat, Password, WriteResPassword, ReadOnlyRecommended, CreateBackup, AccessMode, ConflictResolution, AddToMru, TextCodepage, TextVisualLayout, Local) expression Required. An expression that returns one of the above objects. Filename Optional Variant. A string that indicates the name of the file to be saved. You can include a full path; if you don't, Microsoft Excel saves the file in the current folder. FileFormat Optional Variant. The file format to use when you save the file. For a list of valid choices, see the FileFormat property. For an existing file, the default format is the last file format specified; for a new file, the default is the format of the version of Excel being used. Password Optional Variant. A case-sensitive string (no more than 15 characters) that indicates the protection password to be given to the file. WriteResPassword Optional Variant. A string that indicates the write-reservation password for this file. If a file is saved with the password and the password isn't supplied when the file is opened, the file is opened as read-only. ReadOnlyRecommended Optional Variant. True to display a message when the file is opened, recommending that the file be opened as read-only. CreateBackup Optional Variant. True to create a backup file. AccessMode Optional XlSaveAsAccessMode. XlSaveAsAccessMode can be one of these XlSaveAsAccessMode constants. xlExclusive (exclusive mode) xlNoChange default (don't change the access mode) xlShared (share list) If this argument is omitted, the access mode isn't changed. This argument is ignored if you save a shared list without changing the file name. To change the access mode, use the ExclusiveAccess method. ConflictResolution Optional XlSaveConflictResolution. XlSaveConflictResolution can be one of these XlSaveConflictResolution constants. xlUserResolution (display the conflict-resolution dialog box) xlLocalSessionChanges (automatically accept the local user's changes) xlOtherSessionChanges (accept other changes instead of the local user's changes) If this argument is omitted, the conflict-resolution dialog box is displayed. AddToMru Optional Variant. True to add this workbook to the list of recently used files. The default value is False. TextCodePage Optional Variant. Not used in U.S. English Microsoft Excel. TextVisualLayout Optional Variant. Not used in U.S. English Microsoft Excel. Local Optional Variant. True saves files against the language of Microsoft Excel (including control panel settings). False (default) saves files against the language of Visual Basic for Applications (VBA) (which is typically US English unless the VBA project where Workbooks.Open is run from is an old internationalized XL5/95 VBA project). Example This example creates a new workbook, prompts the user for a file name, and then saves the workbook. Loop Until fName <> False NewBook.SaveAs Filename:=fName
Тэги:
Ответить:
Комментарии доступны только авторизированным пользователям
Похожие вопросы 1С
- v8 Сохранить табличный документ в Excel программно и интерактивно...
- Сохранить как... как Сохранить (Excel)
- Программно скопировать область из Excel книги 1 в Excel книгу 2
- как сохранить excel в DBF без потери информации
- 1с 82 помогите программно сохранить печатную форму в excel
- программно сформировать осв из обработки и сохранить в excel
- v7: Не могу сохранить отчет в формате xls. Меню "Сохранить как" не активно. Этокак ?
- Выгрузка в Excel по шаблону Active Document различия Excel 2010 Excel 2016
- Выгрузка в Excel по шаблону Active Document различия Excel 2010 Excel 2016 ч2
В этой группе 1С
- Как правильно проверить пустая ли дата в поле ТЗ
- Как при изменении реквизита менялся другой до сохранения элемента справочника
- Как картинки из Excel сохранить в 1С 8.0
- настройка сканера Metrologic 5100
- Выгрузка из Камина в ПФР
- Закрытие затрат (счет 40)
- Зачет аванса 62.2-62.1
- v7: Сохранение печатной формы в .doc
- 1С сильно тормозит в разделенном режиме
- Уволенный сотрудник внес в кассу недоудержанный НДФЛ….
- Работа с листами экселя
- Проблемы с обновлением версии 1.1.9.3 на версию 1.2.3.1
- v8+v7 сетевые хаспы. вместе не живут...
- ПУБ УСН Как пользоваться отчетом Расходы при УСН
- v7: Штатное расписание в ЗиК
- Универсальный отчет по регистрам
- Перестала работать загрузка данных из ТИС
- Не найден интерфейс сервера 1С Предприятия 80040155
- ЗиК270 отпуск по уходу за ребенком и количество дней отпуска в приказе
- Ошибка при получении характеристик принтера