---
title: "Salva XLTX come MHTML utilizzando PHP"
description: "Utilizzando Aspose.Cells Cloud SDK per PHP per salvare il file in formato XLTX come file in formato MHTML."

---

# Salva XLTX come MHTML utilizzando PHP


> Utilizzando Aspose.Cells Cloud SDK per PHP per salvare il file in formato XLTX come file in formato MHTML.





















































.progLangContainer {
padding-right: calc(var(--bs-gutter-x)*.1);
padding-left: calc(var(--bs-gutter-x)*.1)
}
.progLangContainer {
padding-right: calc(var(--bs-gutter-x)*.1);
padding-left: calc(var(--bs-gutter-x)*.1)
}
.progLangPlace .progLangContainer .progLang {
color: #fff;
text-decoration: none;
height: 75px;
width: 75px;
text-align: center;
line-height: 65px;
border-radius: 100%;
font-size: 14px;
font-weight: 700;
border: 5px solid #e5e5e5;
box-shadow: 0 15px 8px -5px #666;
display: inline-block;
direction: ltr !important;
margin-bottom: 15px
}
.progLangPlace .progLangContainer .progLang:hover {
border: 7px solid #e5e5e5;
box-shadow: none
}
.progLangPlace .progLangContainer .bigFont {
font-size: 16px !important;
}
.progLangPlace .progLangContainer .selected {
border: 0 solid #e5e5e5;
box-shadow: 0 10px 8px -5px #666, inset 0 0 0 2px #063c72, inset 0 0 0 5px #fff;
cursor: initial !important;
pointer-events: none
}
.progLang:hover {
border: 7px solid #e5e5e5;
box-shadow: none
}
.progLang {
color: #fff;
text-decoration: none;
height: 75px;
width: 75px;
text-align: center;
line-height: 65px;
border-radius: 100%;
font-size: 14px;
font-weight: 700;
border: 5px solid #e5e5e5;
box-shadow: 0 15px 8px -5px #666;
display: inline-block;
direction: ltr !important;
margin-bottom: 15px
}
.pythonColor {
background: #4a59ce !important;
}
.javaColor {
background: #a499f2 !important;
}
.csColor {
background: #42dbb0 !important;
}
.cppColor {
background: #008594 !important;
}
.phpColor {
background: #ca75d7 !important;
}
.rubyColor {
background: #09e !important;
}
.nodeColor {
background: #519e8a !important;
}
.swiftColor {
background: #a2d270 !important;
}
.goColor {
background: #48d9ee !important;
}
.perlColor {
background: #5c9fea !important;
}
.curlColor {
background: #aeae61 !important;
}
.cellsh2, .cellsh1 {
margin-top: 0 !important;
margin-bottom: .5rem !important;
font-weight: 500 !important;
line-height: 1.2 !important;
}
@media (max-width: 868px){
.pf-landing-page-com .header1.minify-header .cellsrow {
display: flex!important;
align-items: center!important;
flex-flow: unset!important;
}
.data-nosnippet{
display:none;
}
.pt-5, .py-5{
padding-top:0px !important;
}
.col-lg-12 .pt-5 .cellsh2{
font-size:18px !important;
margin-top:10px !important;
margin-bottom:10px !important;
}
.cloud-banner-layout{
width:100% !important;
}
}
# Salva XLTX come MHTML
## Libreria PHP per il salvataggio di XLTX come MHTML
Utilizza SaveAs API di Cells Cloud per creare flussi di lavoro personalizzati per fogli di calcolo in PHP. Si tratta di una soluzione professionale per salvare XLTX come MHTML e altri formati di documenti online utilizzando PHP.
[C#](/cells/net/saveas/xltx-to-mhtml/)
[Java](/cells/java/saveas/xltx-to-mhtml/)
[Python](/cells/python/saveas/xltx-to-mhtml/)
[PHP](/cells/php/saveas/xltx-to-mhtml/)
[Go](/cells/go/saveas/xltx-to-mhtml/)
[Node](/cells/nodejs/saveas/xltx-to-mhtml/)
[Perl](/cells/perl/saveas/xltx-to-mhtml/)
[Swift](/cells/swift/saveas/xltx-to-mhtml/)
[Ruby](/cells/ruby/saveas/xltx-to-mhtml/)
[Android](/cells/android/saveas/xltx-to-mhtml/)
.cells_bg_white {
}
@media (max-width: 868px){
.pf-landing-page-com .productfamilypage h2{
font-size:16px !important;
text-align:center !important;
}
.section-layout .heading-border{
font-size:20px !important;
}
}
@media (min-width:1200px){
.section-layout{
width:1170px;margin:0 auto;
line-height:28px;
}
}
## Salva un file XLTX come MHTML in PHP
.panelContainer {
width: 100%;
}
.cells-cloud-input-group {
display: flex;
margin: 15px auto 0;
border: 1px solid #eee;
border-radius: 10px;
background-color: #ffffff;
align-items: center;
justify-content: space-between
}
.cells-cloud-input-group-main {
flex-grow: 1;
display: inline-block;
padding: 0 4px;
color: #333;
display: inline-block;
}
.cells-cloud-input-group-prepend {
display: inline-block;
height: 52px;
border-radius: 10px 0 0 10px;
padding: 0 20px;
background-color: #e3e3e8;
color: #333;
line-height: 50px
}
.cells-cloud-input-group-method {
float: left;
padding-right: 4px;
color: #ccc;
}
.cells-cloud-input-group-main {
display: inline-block
}
.cells-cloud-input-group-append {
float: right;
}
.cells-cloud-link-button {
display: inline-block;
border: 1px solid transparent;
border-left: 1px solid #e3e3e8;
border-radius: 10px 10px 10px 10px;
padding: 0 20px;
outline: none;
box-shadow: none;
background-color: #1a89d0;
text-align: center;
vertical-align: middle;
color: #151617;
line-height: 20px;
font-size: 1rem;
font-weight: 400;
}
.cells-api-text{
text-align: center;
vertical-align: middle;
color: #151617;
line-height: 50px;
font-size: 1rem;
margin: 0 auto;
width: fit-content;
font-weight: 400;
}
.cells-cloud-action-button {
display: inline-block;
width: 100%;
border: 1px solid transparent;
border-left: 1px solid #e3e3e8;
border-radius: 10px 10px 10px 10px;
padding: 0 20px;
outline: none;
box-shadow: none;
text-align: center;
vertical-align: middle;
line-height: 50px;
font-size: 1rem;
margin: 0 auto;
width: fit-content;
font-weight: 400;
}
@media (max-width: 868px){
.cells-cloud-input-group-prepend,.cells-cloud-input-group-method{
display:none !important;
}
.cells-cloud-input-group-main{
padding:0px !important;
}
.spanclass{
float: left;
width: 70%;
overflow: hidden;
}
}
API 
POST 
https://api.aspose.cloud/v3.0/cells/{name}/SaveAs
Try it 
Salvare i formati di file da XLTX come MHTML è un compito complesso. Tutte le transizioni dal formato XLTX al formato MHTML vengono eseguite dal nostro SDK PHP mantenendo il contenuto strutturale e logico principale del foglio di calcolo XLTX di origine. La nostra libreria PHP è una soluzione professionale per salvare XLTX come file MHTML online. Questo Cloud SDK offre agli sviluppatori PHP funzionalità potenti e un output MHTML perfetto.
### PHP Codice Esempio per salvare XLTX come MHTML utilizzando REST API
```
// For complete examples and data files, please go to https://github.com/aspose-cells-cloud/aspose-cells-cloud-php/
$apiInstance = new CellsApi( getenv(&#34;ProductClientId&#34;),getenv(&#34;ProductClientSecret&#34;) );
$name ='Book1.xltx';
$saveOptions =new \Aspose\Cells\Cloud\Model\SaveOptions();
$saveOptions->SaveFormat = &#34;mhtml&#34;;
$newfilename = &#34;Book1Saveas.mhtml&#34;;
$isAutoFitRows= 'true';
$isAutoFitColumns= 'true';
$folder = &#34;Temp&#34;;
$result = $apiInstance->cellsSaveAsPostDocumentSaveAs($name, $saveOptions, $newfilename,$isAutoFitRows, $isAutoFitColumns, $folder);
```
.noreplace-code h3{
font-size:35px !important;
}
.noreplace-code button{
background:white;
}
@media (min-width:1200px){
.noreplace-code{
width:1170px !important;
margin:0 auto;
}
```
}
@media (max-width: 868px){
.noreplace-code h3{
font-size:15px !important;
font-weight:normal !important;
}
.noreplace-code{
width: 90% !important;;
margin: 0 auto !important;;
}
}
```
.section-list{
}
.section-list ul{
display: flex;
flex-direction: row;
justify-content: space-between;
padding: 0px;
}
.section-list li{
list-style: none;
width: 27%;
line-height: 34px;
padding: 15px;
border-radius: 5px;
padding-top: 25px;
padding-bottom: 25px;
font-weight: bold;
word-break: break-all;
display: inline-block;
border: 1px dashed;
margin-bottom: 20px;
margin-right: 0px;
}
.section-list svg{
margin-top: -20px;
margin-left:1%;
margin-right:1%;
}
.heading-border{
font-size:28px !important;
width:100% !important;
padding-bottom:20px;
}
@media (min-width: 1200px){
.howtosection{
width: 1170px !important;
margin:0 auto !important;
}
.olstyle{
width: 1170px !important;
margin:0 auto !important;
}
}
@media (max-width: 868px){
.olstyle h2{
font-size:20px !important;
}
}
.olstyle ol{
list-style-type: none;
margin-right: 0;
margin-bottom: 0;
margin-left: 16px;
padding-top: 0;
padding-right: 0;
padding-bottom: 0;
padding-left: 30px;
}
.olstyle li{
margin-right: 0 !important;
line-height: 30px;
position: relative;
margin-bottom: 10px;
font-size: 18px;
}
.olstyle li a{
font-weight:bold;
text-decoration: underline !important;
}
.olstyle li::before{
position: absolute;
left: -30px;
top: 5px;
display: block;
background: #006bb0;
width: 20px;
height: 20px;
color: #fff;
text-align: center;
line-height: 20px;
font-size: 12px;
font-weight: 700;
border-radius: 10px;
}
.olstyle li:nth-child(1):before {
content: "1"
}
.olstyle li:nth-child(2):before {
content: "2"
}
.olstyle li:nth-child(3):before {
content: "3"
}
.olstyle li:nth-child(4):before {
content: "4"
}
.olstyle li:nth-child(5):before {
content: "5"
}
.olstyle li:nth-child(6):before {
content: "6"
}
.olstyle li:nth-child(7):before {
content: "7"
}
## Come salvare XLTX come MHTML utilizzando la libreria Cells Cloud PHP.
- Registra un account su[Pannello di controllo](https://dashboard.aspose.cloud/) per ottenere gratuitamente la quota API e i dettagli dell'autorizzazione
- Installa la libreria PHP e aggiungi il riferimento (importa la libreria) al tuo progetto.
- Apri il file sorgente in PHP.
- Utilizza il metodo `PostWorkbookSaveAs` per recuperare il flusso risultante.
.section-list{
}
.section-list ul{
display: flex;
flex-direction: row;
justify-content: space-between;
padding: 0px;
}
.section-list li{
list-style: none;
width: 27%;
line-height: 34px;
padding: 15px;
border-radius: 5px;
padding-top: 25px;
padding-bottom: 25px;
font-weight: bold;
word-break: break-all;
display: inline-block;
border: 1px dashed;
margin-bottom: 20px;
margin-right: 0px;
}
.section-list svg{
margin-top: -20px;
margin-left:1%;
margin-right:1%;
}
.heading-border{
font-size:28px !important;
width:100% !important;
padding-bottom:20px;
}
@media (min-width: 1200px){
.howtosection{
width: 1170px !important;
margin:0 auto !important;
}
.olstyle{
width: 1170px !important;
margin:0 auto !important;
}
}
@media (max-width: 868px){
.olstyle h2{
font-size:20px !important;
}
}
.olstyle ol{
list-style-type: none;
margin-right: 0;
margin-bottom: 0;
margin-left: 16px;
padding-top: 0;
padding-right: 0;
padding-bottom: 0;
padding-left: 30px;
}
.olstyle li{
margin-right: 0 !important;
line-height: 30px;
position: relative;
margin-bottom: 10px;
font-size: 18px;
}
.olstyle li a{
font-weight:bold;
text-decoration: underline !important;
}
.olstyle li::before{
position: absolute;
left: -30px;
top: 5px;
display: block;
background: #006bb0;
width: 20px;
height: 20px;
color: #fff;
text-align: center;
line-height: 20px;
font-size: 12px;
font-weight: 700;
border-radius: 10px;
}
.olstyle li:nth-child(1):before {
content: "1"
}
.olstyle li:nth-child(2):before {
content: "2"
}
.olstyle li:nth-child(3):before {
content: "3"
}
.olstyle li:nth-child(4):before {
content: "4"
}
.olstyle li:nth-child(5):before {
content: "5"
}
.olstyle li:nth-child(6):before {
content: "6"
}
.olstyle li:nth-child(7):before {
content: "7"
}
## Requisiti di sistema
- PHP 7.4 o successiva



