fixed .xlt logic
This commit is contained in:
parent
d66c521db0
commit
b71af71035
|
|
@ -310,9 +310,10 @@ namespace OfficeConverter
|
||||||
ConvertDocToDotx(filePath, doSubfolders, doReplace);
|
ConvertDocToDotx(filePath, doSubfolders, doReplace);
|
||||||
break;
|
break;
|
||||||
case ".xlt":
|
case ".xlt":
|
||||||
ConvertXltToXltxAsync(filePath, doSubfolders, doReplace);
|
ConvertXltToXltx(filePath, doSubfolders, doReplace);
|
||||||
break;
|
break;
|
||||||
|
|
||||||
|
|
||||||
default:
|
default:
|
||||||
// Handle other file types or show an error message
|
// Handle other file types or show an error message
|
||||||
Console.WriteLine($"Unsupported file type: {filePath}");
|
Console.WriteLine($"Unsupported file type: {filePath}");
|
||||||
|
|
@ -373,9 +374,7 @@ namespace OfficeConverter
|
||||||
KillProcess("EXCEL");
|
KillProcess("EXCEL");
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
private async Task ConvertXltToXltxAsync(string xltFile, bool doSubfolders, bool doReplace)
|
private void ConvertXltToXltx(string xltFile, bool doSubfolders, bool doReplace)
|
||||||
{
|
|
||||||
await Task.Run(() =>
|
|
||||||
{
|
{
|
||||||
try
|
try
|
||||||
{
|
{
|
||||||
|
|
@ -420,7 +419,6 @@ namespace OfficeConverter
|
||||||
// Handle exceptions during conversion
|
// Handle exceptions during conversion
|
||||||
Console.WriteLine($"Error converting {xltFile}: {ex.Message}");
|
Console.WriteLine($"Error converting {xltFile}: {ex.Message}");
|
||||||
}
|
}
|
||||||
});
|
|
||||||
|
|
||||||
// Update UI on the main thread
|
// Update UI on the main thread
|
||||||
System.Windows.Application.Current.Dispatcher.Invoke(() =>
|
System.Windows.Application.Current.Dispatcher.Invoke(() =>
|
||||||
|
|
@ -432,6 +430,7 @@ namespace OfficeConverter
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
private void ConvertPptToPptx(string pptFile, bool doSubfolders, bool doReplace)
|
private void ConvertPptToPptx(string pptFile, bool doSubfolders, bool doReplace)
|
||||||
{
|
{
|
||||||
PowerPoint.Application pptApp = new PowerPoint.Application();
|
PowerPoint.Application pptApp = new PowerPoint.Application();
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue
Block a user