humanemulator.net — справка.
Продукт, демо и покупка — на
хуманэмулятор.рф
|
Демо
|
Купить
|
API
|
лог изменений
get_sheets_count
get_sheets_count($path); - Получить количество листов в файле ExcelФункция на вход принимает параметры:
После выполнения функции возвращаемое значение будет равно одному из двух :
Пример использования
<?php $xhe_host = "localhost:7010"; // Connect functional objects if not already connected if (!isset($path)){ $path = "../../../Templates/init.php"; require($path); } // Scenario: Demonstrate getting the number of sheets in an Excel file // info echo "\n<span >excelDataReader->" . basename (__FILE__) . "</span>\n"; // Kill any existing Excel processes SYSTEM::$excel->kill(); // Example 1: Get number of sheets in Excel file echo("\n\nExample 1: Get number of sheets in Excel file\n"); $filePath = "test/test.xlsx"; echo("File path: $filePath\n"); $sheetsCount = SYSTEM::$excelDataReader->get_sheets_count($filePath); echo("Number of sheets: $sheetsCount\n"); // Quit the application WINDOW::$app->quit(); ?>
# Additional paths import sys sys.path.insert(0, '../../../Templates PY/') xhe_host = "127.0.0.1:7010" from xweb_human_emulator import * # начало echo("<hr><font color=blue>excelDataReader->get_sheets_count</font><hr>") # 1 echo("1. Получим количество листов : ") echo(excelDataReader.get_sheets_count("test/test.xlsx")) # посмотрим app.shell_execute("open","test/test.xlsx") # Quit app.quit()
#region using using System; using System.Diagnostics; using System.Collections.Generic; using System.Linq; using System.IO; using System.Text; using System.Threading; using XHE; using XHE.XHE_DOM; using XHE.XHE_System; using XHE.XHE_Window; using XHE.XHE_Web; #endregion class Program:XHEScript { static void Main(string[] args) { // init XHE server = "127.0.0.1:7013"; InitXHE(); // начало echo("<hr><font color=blue>excelDataReader.get_sheets_count</font><hr>"); // 1 echo("\n1. Получим количество листов : "); echo(excelDataReader.get_sheets_count("test/test.xlsx")); app.quit(); } }
xhe_host = "127.0.0.1:7010"; // подключим функциональные объекты, если еще не подключен require("../../../Templates JS/init.js"); // начало echo("<hr><font color=blue>excelDataReader->get_sheets_count</font><hr>"); // 1 echo("1. Получим количество листов : "); echo(excelDataReader.get_sheets_count("test/test.xlsx")); // посмотрим app.shell_execute("open","test/test.xlsx"); // Quit app.quit();
=============================================
excelDataReader Объекты DOM System Vision Web Window
=============================================
если что-то непонятно или необходимо узнать или считаете что надо добавить по работе этой функции, пишите в комментарии или на наш форум
.