By just seeing your code segment, I guess this is correct behavior. Please note, when you use the following lines of code, only document properties would be loaded from the workbook which were saved back to the streams (output workbook will have only document properties and no data).
MetadataOptions options = new MetadataOptions(MetadataType.DocumentProperties);
WorkbookMetadata meta = new WorkbookMetadata(ms, options);
Now when you read this very workbook from streams into Aspose.Cells.Workbook object model, there would be no data but only properties in the file. That’s why you are getting “-1” for variable “i” when using the lines of code:
Workbook wb = new Workbook(ms);
int i = wb.Worksheets.Cells.MaxDataColumn;
Let us know if you still have any issue or confusion.