Skip to content

Latest commit

 

History

History
262 lines (198 loc) · 17.9 KB

ExcelConversionApi.md

File metadata and controls

262 lines (198 loc) · 17.9 KB

Dangl\AVACloud\ExcelConversionApi

All URIs are relative to https://avacloud-api.dangl-it.com

Method HTTP request Description
excelConversionConvertToAva POST /conversion/excel/ava Converts Excel files to Dangl.AVA projects.
excelConversionConvertToExcel POST /conversion/excel/excel Converts Excel files to Excel files. Used, for example, when elements were added in excel to generate or modify a project. The Excel file can then be shared containing the full project with all formattings, formulas and styles applied.
excelConversionConvertToGaeb POST /conversion/excel/gaeb Converts Excel files to GAEB files.
excelConversionConvertToOenorm POST /conversion/excel/oenorm Converts Excel files to Oenorm files.

excelConversionConvertToAva

\Dangl\AVACloud\Model\ProjectDto excelConversionConvertToAva($excel_file, $read_new_elements, $rebuild_item_number_schema, $remove_plain_text_long_texts, $remove_html_long_texts)

Converts Excel files to Dangl.AVA projects.

Example

<?php
require_once(__DIR__ . '/vendor/autoload.php');

// Configure OAuth2 access token for authorization: Dangl.Identity
$config = Dangl\AVACloud\Configuration::getDefaultConfiguration()->setAccessToken('YOUR_ACCESS_TOKEN');

$apiInstance = new Dangl\AVACloud\Api\ExcelConversionApi(
    // If you want use custom http client, pass your client which implements `GuzzleHttp\ClientInterface`.
    // This is optional, `GuzzleHttp\Client` will be used as default.
    new GuzzleHttp\Client(),
    $config
);
$excel_file = "/path/to/file.txt"; // \SplFileObject | The input file
$read_new_elements = true; // bool | Defaults to false
$rebuild_item_number_schema = true; // bool | When importing new elements from Excel, sometimes the ItemNumberSchema in the file is not in compliance with the GAEB requirements. Enabling this option tries to repair the ItemNumberSchema. Defaults to false.
$remove_plain_text_long_texts = true; // bool | If set to true, plain text long texts will be removed from the output to reduce response sizes
$remove_html_long_texts = true; // bool | If set to true, html long texts will be removed from the output to reduce response sizes

try {
    $result = $apiInstance->excelConversionConvertToAva($excel_file, $read_new_elements, $rebuild_item_number_schema, $remove_plain_text_long_texts, $remove_html_long_texts);
    print_r($result);
} catch (Exception $e) {
    echo 'Exception when calling ExcelConversionApi->excelConversionConvertToAva: ', $e->getMessage(), PHP_EOL;
}
?>

Parameters

Name Type Description Notes
excel_file \SplFileObject The input file [optional]
read_new_elements bool Defaults to false [optional]
rebuild_item_number_schema bool When importing new elements from Excel, sometimes the ItemNumberSchema in the file is not in compliance with the GAEB requirements. Enabling this option tries to repair the ItemNumberSchema. Defaults to false. [optional]
remove_plain_text_long_texts bool If set to true, plain text long texts will be removed from the output to reduce response sizes [optional]
remove_html_long_texts bool If set to true, html long texts will be removed from the output to reduce response sizes [optional]

Return type

\Dangl\AVACloud\Model\ProjectDto

Authorization

Dangl.Identity

HTTP request headers

  • Content-Type: multipart/form-data
  • Accept: application/vnd.com.dangl-it.ProjectDto.v1+json, application/problem+json

[Back to top] [Back to API list] [Back to Model list] [Back to README]

excelConversionConvertToExcel

\SplFileObject excelConversionConvertToExcel($excel_file, $read_new_elements, $rebuild_item_number_schema, $write_prices, $write_long_texts, $conversion_culture)

Converts Excel files to Excel files. Used, for example, when elements were added in excel to generate or modify a project. The Excel file can then be shared containing the full project with all formattings, formulas and styles applied.

Example

<?php
require_once(__DIR__ . '/vendor/autoload.php');

// Configure OAuth2 access token for authorization: Dangl.Identity
$config = Dangl\AVACloud\Configuration::getDefaultConfiguration()->setAccessToken('YOUR_ACCESS_TOKEN');

$apiInstance = new Dangl\AVACloud\Api\ExcelConversionApi(
    // If you want use custom http client, pass your client which implements `GuzzleHttp\ClientInterface`.
    // This is optional, `GuzzleHttp\Client` will be used as default.
    new GuzzleHttp\Client(),
    $config
);
$excel_file = "/path/to/file.txt"; // \SplFileObject | The input file
$read_new_elements = true; // bool | Defaults to false
$rebuild_item_number_schema = true; // bool | When importing new elements from Excel, sometimes the ItemNumberSchema in the file is not in compliance with the GAEB requirements. Enabling this option tries to repair the ItemNumberSchema. Defaults to false.
$write_prices = true; // bool | Defaults to true
$write_long_texts = true; // bool | Defaults to true
$conversion_culture = "conversion_culture_example"; // string | The culture that should be used for the conversion process, to have localized Excel files

try {
    $result = $apiInstance->excelConversionConvertToExcel($excel_file, $read_new_elements, $rebuild_item_number_schema, $write_prices, $write_long_texts, $conversion_culture);
    print_r($result);
} catch (Exception $e) {
    echo 'Exception when calling ExcelConversionApi->excelConversionConvertToExcel: ', $e->getMessage(), PHP_EOL;
}
?>

Parameters

Name Type Description Notes
excel_file \SplFileObject The input file [optional]
read_new_elements bool Defaults to false [optional]
rebuild_item_number_schema bool When importing new elements from Excel, sometimes the ItemNumberSchema in the file is not in compliance with the GAEB requirements. Enabling this option tries to repair the ItemNumberSchema. Defaults to false. [optional]
write_prices bool Defaults to true [optional]
write_long_texts bool Defaults to true [optional]
conversion_culture string The culture that should be used for the conversion process, to have localized Excel files [optional]

Return type

\SplFileObject

Authorization

Dangl.Identity

HTTP request headers

  • Content-Type: multipart/form-data
  • Accept: text/plain, application/json, text/json, application/problem+json

[Back to top] [Back to API list] [Back to Model list] [Back to README]

excelConversionConvertToGaeb

\SplFileObject excelConversionConvertToGaeb($excel_file, $read_new_elements, $rebuild_item_number_schema, $destination_gaeb_type, $target_exchange_phase_transform, $enforce_strict_offer_phase_long_text_output, $export_quantity_determination, $remove_unprintable_characters_from_texts, $force_include_descriptions)

Converts Excel files to GAEB files.

Example

<?php
require_once(__DIR__ . '/vendor/autoload.php');

// Configure OAuth2 access token for authorization: Dangl.Identity
$config = Dangl\AVACloud\Configuration::getDefaultConfiguration()->setAccessToken('YOUR_ACCESS_TOKEN');

$apiInstance = new Dangl\AVACloud\Api\ExcelConversionApi(
    // If you want use custom http client, pass your client which implements `GuzzleHttp\ClientInterface`.
    // This is optional, `GuzzleHttp\Client` will be used as default.
    new GuzzleHttp\Client(),
    $config
);
$excel_file = "/path/to/file.txt"; // \SplFileObject | The input file
$read_new_elements = true; // bool | Defaults to false
$rebuild_item_number_schema = true; // bool | When importing new elements from Excel, sometimes the ItemNumberSchema in the file is not in compliance with the GAEB requirements. Enabling this option tries to repair the ItemNumberSchema. Defaults to false.
$destination_gaeb_type = "destination_gaeb_type_example"; // string | Defaults to GAEB XML V3.2
$target_exchange_phase_transform = "target_exchange_phase_transform_example"; // string | Defaults to none, meaning no transformation will be done
$enforce_strict_offer_phase_long_text_output = true; // bool | Defaults to false. If this is enabled, exported long texts to GAEB XML that use text additions will be strictly schema compliant. If this is not enabled, any text that is marked to contain a text addition is exported in full to ensure that incorrectly used text additions are still preserved in the export.
$export_quantity_determination = true; // bool | Defaults to false. If this is enabled, quantities are exported in detail in GAEB XML targets via the 'QtyDeterm' (Quantity Determination, or Quantity Take Off) fields. To control this, you can set custom quantity calculations in the 'QuantityComponents' property of positions. Please see the entry for 'Quantity Determination' in the Dangl.AVA HowTo documentation section. Please be advised that enabling this might export data that was not intended to be exported, like internal quantity calculation details, depending on what data you put in the 'QuantityComponents' property.
$remove_unprintable_characters_from_texts = true; // bool | If this is enabled, unprintable characters are removed from text elements. Otherwise, the conversion might fail in case some text content contains characters that are not allowed in XML output formats.
$force_include_descriptions = true; // bool | If this is enabled, all description elements like texts and execution descriptions will be output to the result. This is mostly only applicable to GAEB exports to phase 84 - Offer, which does typically not include descriptions.

try {
    $result = $apiInstance->excelConversionConvertToGaeb($excel_file, $read_new_elements, $rebuild_item_number_schema, $destination_gaeb_type, $target_exchange_phase_transform, $enforce_strict_offer_phase_long_text_output, $export_quantity_determination, $remove_unprintable_characters_from_texts, $force_include_descriptions);
    print_r($result);
} catch (Exception $e) {
    echo 'Exception when calling ExcelConversionApi->excelConversionConvertToGaeb: ', $e->getMessage(), PHP_EOL;
}
?>

Parameters

Name Type Description Notes
excel_file \SplFileObject The input file [optional]
read_new_elements bool Defaults to false [optional]
rebuild_item_number_schema bool When importing new elements from Excel, sometimes the ItemNumberSchema in the file is not in compliance with the GAEB requirements. Enabling this option tries to repair the ItemNumberSchema. Defaults to false. [optional]
destination_gaeb_type string Defaults to GAEB XML V3.2 [optional]
target_exchange_phase_transform string Defaults to none, meaning no transformation will be done [optional]
enforce_strict_offer_phase_long_text_output bool Defaults to false. If this is enabled, exported long texts to GAEB XML that use text additions will be strictly schema compliant. If this is not enabled, any text that is marked to contain a text addition is exported in full to ensure that incorrectly used text additions are still preserved in the export. [optional]
export_quantity_determination bool Defaults to false. If this is enabled, quantities are exported in detail in GAEB XML targets via the 'QtyDeterm' (Quantity Determination, or Quantity Take Off) fields. To control this, you can set custom quantity calculations in the 'QuantityComponents' property of positions. Please see the entry for 'Quantity Determination' in the Dangl.AVA HowTo documentation section. Please be advised that enabling this might export data that was not intended to be exported, like internal quantity calculation details, depending on what data you put in the 'QuantityComponents' property. [optional]
remove_unprintable_characters_from_texts bool If this is enabled, unprintable characters are removed from text elements. Otherwise, the conversion might fail in case some text content contains characters that are not allowed in XML output formats. [optional]
force_include_descriptions bool If this is enabled, all description elements like texts and execution descriptions will be output to the result. This is mostly only applicable to GAEB exports to phase 84 - Offer, which does typically not include descriptions. [optional]

Return type

\SplFileObject

Authorization

Dangl.Identity

HTTP request headers

  • Content-Type: multipart/form-data
  • Accept: text/plain, application/json, text/json, application/problem+json

[Back to top] [Back to API list] [Back to Model list] [Back to README]

excelConversionConvertToOenorm

\SplFileObject excelConversionConvertToOenorm($excel_file, $read_new_elements, $rebuild_item_number_schema, $destination_oenorm_type, $try_repair_project_structure, $skip_try_enforce_schema_compliant_xml_output, $remove_unprintable_characters_from_texts)

Converts Excel files to Oenorm files.

Example

<?php
require_once(__DIR__ . '/vendor/autoload.php');

// Configure OAuth2 access token for authorization: Dangl.Identity
$config = Dangl\AVACloud\Configuration::getDefaultConfiguration()->setAccessToken('YOUR_ACCESS_TOKEN');

$apiInstance = new Dangl\AVACloud\Api\ExcelConversionApi(
    // If you want use custom http client, pass your client which implements `GuzzleHttp\ClientInterface`.
    // This is optional, `GuzzleHttp\Client` will be used as default.
    new GuzzleHttp\Client(),
    $config
);
$excel_file = "/path/to/file.txt"; // \SplFileObject | The input file
$read_new_elements = true; // bool | Defaults to false
$rebuild_item_number_schema = true; // bool | When importing new elements from Excel, sometimes the ItemNumberSchema in the file is not in compliance with the GAEB requirements. Enabling this option tries to repair the ItemNumberSchema. Defaults to false.
$destination_oenorm_type = "destination_oenorm_type_example"; // string | Defaults to Lv2015
$try_repair_project_structure = true; // bool | Defaults to false. If this is enabled, the converter will try to ensure that the project structure can be mapped to Oenorm. It might introduce additional group levels to ensure a compatible target
$skip_try_enforce_schema_compliant_xml_output = true; // bool | If this option is enabled, AVACloud will not attempt to force a schema-compliant Xml output for ÖNorm targets that are Xml based. By default, AVACloud will try to add required fields, even if no data is present, with sensible defaults. This behavior can be disabled with this option.
$remove_unprintable_characters_from_texts = true; // bool | If this is enabled, unprintable characters are removed from text elements. Otherwise, the conversion might fail in case some text content contains characters that are not allowed in XML output formats.

try {
    $result = $apiInstance->excelConversionConvertToOenorm($excel_file, $read_new_elements, $rebuild_item_number_schema, $destination_oenorm_type, $try_repair_project_structure, $skip_try_enforce_schema_compliant_xml_output, $remove_unprintable_characters_from_texts);
    print_r($result);
} catch (Exception $e) {
    echo 'Exception when calling ExcelConversionApi->excelConversionConvertToOenorm: ', $e->getMessage(), PHP_EOL;
}
?>

Parameters

Name Type Description Notes
excel_file \SplFileObject The input file [optional]
read_new_elements bool Defaults to false [optional]
rebuild_item_number_schema bool When importing new elements from Excel, sometimes the ItemNumberSchema in the file is not in compliance with the GAEB requirements. Enabling this option tries to repair the ItemNumberSchema. Defaults to false. [optional]
destination_oenorm_type string Defaults to Lv2015 [optional]
try_repair_project_structure bool Defaults to false. If this is enabled, the converter will try to ensure that the project structure can be mapped to Oenorm. It might introduce additional group levels to ensure a compatible target [optional]
skip_try_enforce_schema_compliant_xml_output bool If this option is enabled, AVACloud will not attempt to force a schema-compliant Xml output for ÖNorm targets that are Xml based. By default, AVACloud will try to add required fields, even if no data is present, with sensible defaults. This behavior can be disabled with this option. [optional]
remove_unprintable_characters_from_texts bool If this is enabled, unprintable characters are removed from text elements. Otherwise, the conversion might fail in case some text content contains characters that are not allowed in XML output formats. [optional]

Return type

\SplFileObject

Authorization

Dangl.Identity

HTTP request headers

  • Content-Type: multipart/form-data
  • Accept: text/plain, application/json, text/json, application/problem+json

[Back to top] [Back to API list] [Back to Model list] [Back to README]