Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Issue with values field for xlsx file using golang SDK #473

Closed
archit-bedrock opened this issue Apr 20, 2023 · 7 comments · Fixed by microsoft/kiota-abstractions-go#149
Closed
Assignees
Labels
blocked resolving this issue is blocked by an upstream dependency bug Something isn't working

Comments

@archit-bedrock
Copy link

Hi,

I'm trying to get values from an xlsx file using the golang SDK. This is how I'm constructing the builder -

r := "A1:M1"
ptrRange := &r
p.graph.Drives().ByDriveId(driveID).Items().ByDriveItemId(itemID).Workbook().Worksheets().ByWorkbookWorksheetId("Sheet1").RangeWithAddress(ptrRange)

and this is how I'm trying to get the values field.

res, err := e.builder.Get(ctx, e.options)
if err != nil {
    return nil, util.Error(err)
}
w := jsonserialization.NewJsonSerializationWriter()
fmt.Println("cell count: ", *res.GetCellCount())
fmt.Println("column hidden: ", *res.GetColumnHidden())
err = res.GetValues().Serialize(w)
if err != nil {
return nil, err
}
elem, err := w.GetSerializedContent()
if err != nil {
return nil, err

// This always returns [], even though on the graph explorer UI there are entries for values
fmt.Println(elem)
}

I tried this on the graph explorer UI and the values field is correctly populated for the xlsx file.

The cell count and column hidden field show up using the SDK, but the values field always returns an empty result. Is there something I need to do differently to get the values field?

Thanks so much!

@ghost ghost added the Needs Triage 🔍 label Apr 20, 2023
@archit-bedrock
Copy link
Author

archit-bedrock commented Apr 20, 2023

To simplify this - would it be possible to know if there is another method of serialization needed for the Jsonable type to get the results stored in values from the response result? I tried using the default json.Marshal approach as well which also gave an empty result.

@baywet baywet added question Further information is requested Needs Attention 👋 and removed Needs Triage 🔍 labels Apr 21, 2023
@archit-bedrock
Copy link
Author

archit-bedrock commented Apr 24, 2023

Any follow up on this? Just wanted to see if this issue can be resolved. Thank you!

@rkodev
Copy link
Contributor

rkodev commented Apr 26, 2023

Hi @archit-bedrock, Thanks for highlighting this issue. The reason you are unable to access the data from the result object stems from an issue with how kiota, an automated code generator responsible for generating this sdk, interprets what should be "generic Json objects" as an actual struct and generates the code for it. There is an issue in code generator and once resolved the value object in this scenario should provide methods to access the serialized data

@archit-bedrock
Copy link
Author

Thanks @rkodev for the response! Is there a timeline I can expect to have this issue resolved. Thanks again

@archit-bedrock
Copy link
Author

@rkodev Just wanted to follow up. Is there an estimate on when I can expect this issue to get resolved?

@rkodev
Copy link
Contributor

rkodev commented Jul 12, 2023

Hi @archit-bedrock , thanks for the patience. We have some tests in progress to enable access of this data as the changes are being worked out in the code generator

@baywet baywet added bug Something isn't working blocked resolving this issue is blocked by an upstream dependency and removed question Further information is requested Needs Attention 👋 labels Jul 19, 2023
@bssughosh
Copy link

I still am facing this issue. I am getting empty values in the go sdk but when I make an API call, I cam able to see the values

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
blocked resolving this issue is blocked by an upstream dependency bug Something isn't working
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants