Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -370,6 +370,7 @@ public IActionResult Open(IFormCollection openRequest)
{
OpenRequest open = new OpenRequest();
open.AllowExternalWorkbook = false;
open.Guid = openRequest["Guid"];
open.File = openRequest.Files[0];
return Content(Workbook.Open(open));
}
Expand Down Expand Up @@ -470,16 +471,11 @@ By default, the Spreadsheet control saves the Excel file and downloads it to the

public string Save(SaveSettings saveSettings)
{
ExcelEngine excelEngine = new ExcelEngine();
IApplication application = excelEngine.Excel;
try
{

// Save the workbook as stream.
Stream fileStream = Workbook.Save<Stream>(saveSettings);
// Using XLSIO, we are opening the file stream and saving the file in the server under "Files" folder.
// You can also save the stream file in your server location.
IWorkbook workbook = application.Workbooks.Open(fileStream);
string basePath = _env.ContentRootPath + "\\Files\\" + saveSettings.FileName + ".xlsx";
var file = System.IO.File.Create(basePath);
fileStream.Seek(0, SeekOrigin.Begin);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -355,6 +355,7 @@ When you open an excel file that contains external workbook references, you will
public ActionResult Open(OpenRequest openRequest)
{
openRequest.AllowExternalWorkbook = false;
openRequest.Guid = openRequest["Guid"];
return Content(Workbook.Open(open));
}
```
Expand Down Expand Up @@ -454,16 +455,11 @@ By default, the Spreadsheet control saves the Excel file and downloads it to the

public string Save(SaveSettings saveSettings)
{
ExcelEngine excelEngine = new ExcelEngine();
IApplication application = excelEngine.Excel;
try
{

// Save the workbook as stream.
Stream fileStream = Workbook.Save<Stream>(saveSettings);
// Using XLSIO, we are opening the file stream and saving the file in the server under "Files" folder.
// You can also save the stream file in your server location.
IWorkbook workbook = application.Workbooks.Open(fileStream);
string basePath = _env.ContentRootPath + "\\Files\\" + saveSettings.FileName + ".xlsx";
var file = System.IO.File.Create(basePath);
fileStream.Seek(0, SeekOrigin.Begin);
Expand Down
6 changes: 1 addition & 5 deletions Document-Processing/Excel/Spreadsheet/Angular/open-save.md
Original file line number Diff line number Diff line change
Expand Up @@ -456,6 +456,7 @@ public IActionResult Open(IFormCollection openRequest)
{
OpenRequest open = new OpenRequest();
open.AllowExternalWorkbook = false;
open.Guid = openRequest["Guid"];
open.File = openRequest.Files[0];
return Content(Workbook.Open(open));
}
Expand Down Expand Up @@ -554,16 +555,11 @@ By default, the Spreadsheet component saves the Excel file and downloads it to t

public string Save(SaveSettings saveSettings)
{
ExcelEngine excelEngine = new ExcelEngine();
IApplication application = excelEngine.Excel;
try
{

// Save the workbook as stream.
Stream fileStream = Workbook.Save<Stream>(saveSettings);
// Using XLSIO, we are opening the file stream and saving the file in the server under "Files" folder.
// You can also save the stream file in your server location.
IWorkbook workbook = application.Workbooks.Open(fileStream);
string basePath = _env.ContentRootPath + "\\Files\\" + saveSettings.FileName + ".xlsx";
var file = System.IO.File.Create(basePath);
fileStream.Seek(0, SeekOrigin.Begin);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -413,6 +413,7 @@ public IActionResult Open(IFormCollection openRequest)
{
OpenRequest open = new OpenRequest();
open.AllowExternalWorkbook = false;
open.Guid = openRequest["Guid"];
open.File = openRequest.Files[0];
return Content(Workbook.Open(open));
}
Expand Down Expand Up @@ -520,16 +521,11 @@ By default, the Spreadsheet control saves the Excel file and downloads it to the

public string Save(SaveSettings saveSettings)
{
ExcelEngine excelEngine = new ExcelEngine();
IApplication application = excelEngine.Excel;
try
{

// Save the workbook as stream.
Stream fileStream = Workbook.Save<Stream>(saveSettings);
// Using XLSIO, we are opening the file stream and saving the file in the server under "Files" folder.
// You can also save the stream file in your server location.
IWorkbook workbook = application.Workbooks.Open(fileStream);
string basePath = _env.ContentRootPath + "\\Files\\" + saveSettings.FileName + ".xlsx";
var file = System.IO.File.Create(basePath);
fileStream.Seek(0, SeekOrigin.Begin);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -419,6 +419,7 @@ public IActionResult Open(IFormCollection openRequest)
{
OpenRequest open = new OpenRequest();
open.AllowExternalWorkbook = false;
open.Guid = openRequest["Guid"];
open.File = openRequest.Files[0];
return Content(Workbook.Open(open));
}
Expand Down Expand Up @@ -526,16 +527,11 @@ By default, the Spreadsheet control saves the Excel file and downloads it to the

public string Save(SaveSettings saveSettings)
{
ExcelEngine excelEngine = new ExcelEngine();
IApplication application = excelEngine.Excel;
try
{

// Save the workbook as stream.
Stream fileStream = Workbook.Save<Stream>(saveSettings);
// Using XLSIO, we are opening the file stream and saving the file in the server under "Files" folder.
// You can also save the stream file in your server location.
IWorkbook workbook = application.Workbooks.Open(fileStream);
string basePath = _env.ContentRootPath + "\\Files\\" + saveSettings.FileName + ".xlsx";
var file = System.IO.File.Create(basePath);
fileStream.Seek(0, SeekOrigin.Begin);
Expand Down
6 changes: 1 addition & 5 deletions Document-Processing/Excel/Spreadsheet/React/open-save.md
Original file line number Diff line number Diff line change
Expand Up @@ -434,6 +434,7 @@ public IActionResult Open(IFormCollection openRequest)
{
OpenRequest open = new OpenRequest();
open.AllowExternalWorkbook = false;
open.Guid = openRequest["Guid"];
open.File = openRequest.Files[0];
return Content(Workbook.Open(open));
}
Expand Down Expand Up @@ -546,16 +547,11 @@ By default, the Spreadsheet component saves the Excel file and downloads it to t

public string Save(SaveSettings saveSettings)
{
ExcelEngine excelEngine = new ExcelEngine();
IApplication application = excelEngine.Excel;
try
{

// Save the workbook as stream.
Stream fileStream = Workbook.Save<Stream>(saveSettings);
// Using XLSIO, we are opening the file stream and saving the file in the server under "Files" folder.
// You can also save the stream file in your server location.
IWorkbook workbook = application.Workbooks.Open(fileStream);
string basePath = _env.ContentRootPath + "\\Files\\" + saveSettings.FileName + ".xlsx";
var file = System.IO.File.Create(basePath);
fileStream.Seek(0, SeekOrigin.Begin);
Expand Down
6 changes: 1 addition & 5 deletions Document-Processing/Excel/Spreadsheet/Vue/open-save.md
Original file line number Diff line number Diff line change
Expand Up @@ -615,6 +615,7 @@ public IActionResult Open(IFormCollection openRequest)
{
OpenRequest open = new OpenRequest();
open.AllowExternalWorkbook = false;
open.Guid = openRequest["Guid"];
open.File = openRequest.Files[0];
return Content(Workbook.Open(open));
}
Expand Down Expand Up @@ -721,16 +722,11 @@ By default, the Spreadsheet component saves the Excel file and downloads it to t

public string Save(SaveSettings saveSettings)
{
ExcelEngine excelEngine = new ExcelEngine();
IApplication application = excelEngine.Excel;
try
{

// Save the workbook as stream.
Stream fileStream = Workbook.Save<Stream>(saveSettings);
// Using XLSIO, we are opening the file stream and saving the file in the server under "Files" folder.
// You can also save the stream file in your server location.
IWorkbook workbook = application.Workbooks.Open(fileStream);
string basePath = _env.ContentRootPath + "\\Files\\" + saveSettings.FileName + ".xlsx";
var file = System.IO.File.Create(basePath);
fileStream.Seek(0, SeekOrigin.Begin);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -22,8 +22,7 @@ function App() {
{
method: 'POST',
headers: { Authorization: 'YOUR TEXT' },
body: formData,
mode: 'no-cors'
body: formData
}
).then((response) => {
response.blob().then((data) => {
Expand Down Expand Up @@ -63,4 +62,4 @@ function App() {
export default App;

const root = createRoot(document.getElementById('root'));
root.render(<App />);
root.render(<App />);
Original file line number Diff line number Diff line change
Expand Up @@ -22,8 +22,7 @@ function App() {
{
method: 'POST',
headers: { Authorization: 'YOUR TEXT' },
body: formData,
mode: 'no-cors'
body: formData
}
).then((response) => {
response.blob().then((data) => {
Expand Down Expand Up @@ -63,4 +62,4 @@ function App() {
export default App;

const root = createRoot(document.getElementById('root')!);
root.render(<App />);
root.render(<App />);